How to Change From-address When Using Gmail Smtp Server

change sender address when sending mail through gmail in c#

Gmail doesn't allow you to change the FROM to something different than your gmail account.

It doesn't matter what you use, they over-write it, before they relay it on. This prevent spamming/spoofing.

When using Gmail for SMTP, can you set a different from address?

gmail doesn't allow you to use random From addresses. You have to add and validate the address you'd like to use in the gmail settings:

Settings -> Accounts -> Send mail as -> Add another email address you own

cakeemail and gmail smtp how to change the FROM field?

Apparently, Gmail SMTP will always overwrite the FROM field to prevent spamming.

See https://stackoverflow.com/a/3872880/80353

If anyone can help to attach the actual GMail documentation stating this point, that would be great.

changing from address on send_mail

I think this answers it. Gmail won't allow me to forge a from address, therefore the from address will always be admin@mywebsite.com

to send email with different 'from' email address using gmail smtp server in django

Sending email from secondary address using gmail SMTP

Looks like what I had to do was just wait...
Now it works fine without changing any code.

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

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.

change sender e-mail address

No, gmail does not allow you to set arbitrary sender addresses. It does allow you to define a limited number of preset aliases in your account settings, but you can't set random addresses at the point of sending. If you do, it will just ignore it and use your account address instead, as you're seeing. This is mentioned in the PHPMailer troubleshooting guide.



Related Topics



Leave a reply



Submit