Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Rails and Gmail SMTP, how to use a custom from address

I've got my Rails (2.1) app setup to send email via Gmail, however whenever I send an email no matter what I set the from address to in my ActionMailer the emails always come as if sent from my Gmail email address. Is this a security restriction they've put in place at Gmail to stop spammers using their SMTP?

Note: I've tried both of the following methods within my ActionMailer (just in case):

@from = [email protected]
from '[email protected]'
like image 736
DEfusion Avatar asked Sep 20 '08 21:09

DEfusion


1 Answers

I believe it's just something Gmail does when mail is sent through its SMTP, as it was mentioned that they do this on a tutorial about using their SMTP to send mail.

like image 176
ColinD Avatar answered Sep 28 '22 00:09

ColinD