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
How to Bind an Array of Strings With MySQLi Prepared Statement
How to Get File_Get_Contents() to Work With Https
How to Post Json Data With PHP Curl
How to Run PHP from Windows Command Line in Wampserver
Multiple Inputs With Same Name Through Post in PHP
Using .Htaccess to Make All .Html Pages to Run as .PHP Files
Send Email With PHP from HTML Form on Submit With the Same Script
How to Post Data in PHP Using File_Get_Contents
Reference: What Is a Perfect Code Sample Using the MySQL Extension
How to Insert Multiple Rows from Array Using Codeigniter Framework
Sort an Array by Keys Based on Another Array
Allow PHP Sessions to Carry Over to Subdomains
How to Encrypt and Decrypt a PHP String
Calculate Number of Hours Between 2 Dates in PHP
How Can One Check to See If a Remote File Exists Using PHP