I am using SMTP authentication to send Email...
It is working fine but now problem is that I want to add new email address in From but it is taking Authenticated Email by default.
So how to solve it ???
For example,
MailMessage mail = new MailMessage();
SmtpClient SmtpMail = new SmtpClient();
mail.To.Add("jeeten@gmail.com");
mail.from = new mailaddress("fbg@gmail.com");
Here, It is sending email for sure but when I check header of from then it is displaying jeeten@gmail.com instead of fbg@gmail.com...
jeeten.parma...
Member
75 Points
95 Posts
Send Email using SMTP problem with From
Jan 22, 2013 09:33 AM|LINK
I am using SMTP authentication to send Email...
It is working fine but now problem is that I want to add new email address in From but it is taking Authenticated Email by default.
So how to solve it ???
For example,
MailMessage mail = new MailMessage(); SmtpClient SmtpMail = new SmtpClient(); mail.To.Add("jeeten@gmail.com"); mail.from = new mailaddress("fbg@gmail.com");Here, It is sending email for sure but when I check header of from then it is displaying jeeten@gmail.com instead of fbg@gmail.com...
rsrvs214
Member
208 Points
81 Posts
Re: Send Email using SMTP problem with From
Jan 22, 2013 09:49 AM|LINK
try
mail.From= new System.Net.Mail.MailAddress("fbg@gmail.com");jeeten.parma...
Member
75 Points
95 Posts
Re: Send Email using SMTP problem with From
Jan 22, 2013 09:55 AM|LINK
Hello Friend,
I tried it already but it is taking authenticated id only...
rsrvs214
Member
208 Points
81 Posts
Re: Send Email using SMTP problem with From
Jan 22, 2013 10:03 AM|LINK
Okay
Please check below link
http://www.dotnetjalps.com/2009/07/sending-email-through.html
jeeten.parma...
Member
75 Points
95 Posts
Re: Send Email using SMTP problem with From
Jan 22, 2013 10:07 AM|LINK
I know that thing.
But tell me one thing, Is it possible to use different email in from other than email which one is used for smtp crediantials?...