Click here to Skip to main content
15,940,550 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have an issue in my application. I am using SMTP server credentials to send emails. It includes a hostname, port no=587, username=”” password=””. I have created a mail message object and set the from and to address to “”,””. I am getting emails, but the from id is always taken as the username ie, How it happens? How can I change the email address to

You can't change it. Last I checked, GMail doesn't allow you to set the From address different from the account that's being used to send.
Share this answer
I believe the only real way to do this would be to find an open SMTP relay to use to send the e-mail.
This would not require any form of authentication and so would be able to send the e-mail as being from whoever you wish.
Share this answer
Thomas Daniels 14-Jun-13 9:06am    
Yes, but if you do that, your mail would probably move into the Spam folder.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900