.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
 
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
david stephan

Home >> Forum >> C# >> Post New QuestionBookmark and Share Subscribe to Forum

About Email Sending

Posted By: Vikramraj     Posted Date: August 13, 2010    Points:2   Category :C#
I have written Email Sending code having System.Net.NetworkCredential And having System.Net.Mail Namespace
I use Gmail Account to send Email through code.

when i send This Email I get receivers Inbox from as my from Email ID but i want to Dispaly Different name or different Email address having different Domain.

Plz give me the solutoin.

Responses
Author: Hiren Soni             
Posted Date: August 14, 2010     Points: 5   

google doesn't provide to do this :

it will take email-id name from your Credential.

Hiren soni
http://www.dotnetask.com
Author: Nikhil Kumar             
Posted Date: August 21, 2010     Points: 5   

i think you can do it with yahoo.

Be helpful and enjoy life because it comes only onces. Give all the happiness to yours and remember it doesn't comes by money ...
Author: krishana singh             
Posted Date: November 30, 2010     Points: 5   

string bodytext = "<html>";
bodytext += "<table border='1px'>";
bodytext += "<tr><td>Name</td><td>" + txtname.Text + "</tr></br>";
bodytext += "<tr><td>E-mail</td><td>" + txtmail.Text + "</tr></br>";
bodytext += "<tr><td>Contact Number</td><td>" + txtcontact.Text + "</tr></br>";
bodytext += "<tr><td>Comment</td><td>" + txtcomment.Text + "</tr></br>";
bodytext += "</table>";
bodytext += "</html>";

Email.SendMail(txtmail.Text, "info@bhutanijewellers.com", "Contact information", bodytext);


Author: krishana singh             
Posted Date: November 30, 2010     Points: 5   

string bodytext = "<html>";
bodytext += "<table border='1px'>";
bodytext += "<tr><td>Name</td><td>" + txtname.Text + "</tr></br>";
bodytext += "<tr><td>E-mail</td><td>" + txtmail.Text + "</tr></br>";
bodytext += "<tr><td>Contact Number</td><td>" + txtcontact.Text + "</tr></br>";
bodytext += "<tr><td>Comment</td><td>" + txtcomment.Text + "</tr></br>";
bodytext += "</table>";
bodytext += "</html>";

Email.SendMail(txtmail.Text, "info@bhutanijewellers.com", "Contact information", bodytext);


Author: Don             
Posted Date: January 11, 2011     Points: 5   

Try this so that u can give a different display name..

mailMsg.From = new MailAddress("FromAddress", "FromName");
mailMsg.To.Add(new MailAddress("ToAddress","ToName");




Post Reply

You must Sign In To post reply
 
 
Find more Forum Questions on C#, ASP.Net, Vb.Net, SQL Server and more Here
Quick Links For Forum Categories:
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  OOPs  SilverlightIISJQuery
JavaScript/VBScriptBiztalkWPFPatten/PracticesWCFOthers
www.DotNetSpark.comUnAnsweredAll

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend