By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,417 Members | 1,856 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,417 IT Pros & Developers. It's quick & easy.

ASP.NET Email From Name (non-email address)

P: n/a
Hi I am sending emails from my website. The from field usually is an
email address, but alot of email readers also seem to be able to
pickup a "from real name". I read somewhere that I can set this by
putting the name followed by the actual email address in
parathesis....like this...

MailMessage msgMail = new MailMessage();
msgMail.To = EmailAddress.Text;
msgMail.From = "funny email Website" + "(we*****@funny.net)";
msgMail.Subject = "Your Document";
msgMail.BodyFormat = MailFormat.Text;
msgMail.Body = " ";
SmtpMail.SmtpServer = "127.0.0.1";
SmtpMail.Send(msgMail);

However this doesn't seem to work for me. I am sending to an email
address in the same domain....I just get from "Website"

Any ideas, I seem to remember that CDONTS had support for a FromName,
why don't we have this in .net????
Jul 21 '05 #1
Share this Question
Share on Google+
6 Replies


P: n/a
The format is : Display Name <email address>

so msgMail.From = "Some Name <someemail>";

Craig
--
http://www.typemismatch.com/
(For Developers!)

"magister" <MB*********@yahoo.com> wrote in message
news:a0**************************@posting.google.c om...
Hi I am sending emails from my website. The from field usually is an
email address, but alot of email readers also seem to be able to
pickup a "from real name". I read somewhere that I can set this by
putting the name followed by the actual email address in
parathesis....like this...

MailMessage msgMail = new MailMessage();
msgMail.To = EmailAddress.Text;
msgMail.From = "funny email Website" + "(we*****@funny.net)";
msgMail.Subject = "Your Document";
msgMail.BodyFormat = MailFormat.Text;
msgMail.Body = " ";
SmtpMail.SmtpServer = "127.0.0.1";
SmtpMail.Send(msgMail);

However this doesn't seem to work for me. I am sending to an email
address in the same domain....I just get from "Website"

Any ideas, I seem to remember that CDONTS had support for a FromName,
why don't we have this in .net????

Jul 21 '05 #2

P: n/a
The format is : Display Name <email address>

so msgMail.From = "Some Name <someemail>";

Craig
--
http://www.typemismatch.com/
(For Developers!)

"magister" <MB*********@yahoo.com> wrote in message
news:a0**************************@posting.google.c om...
Hi I am sending emails from my website. The from field usually is an
email address, but alot of email readers also seem to be able to
pickup a "from real name". I read somewhere that I can set this by
putting the name followed by the actual email address in
parathesis....like this...

MailMessage msgMail = new MailMessage();
msgMail.To = EmailAddress.Text;
msgMail.From = "funny email Website" + "(we*****@funny.net)";
msgMail.Subject = "Your Document";
msgMail.BodyFormat = MailFormat.Text;
msgMail.Body = " ";
SmtpMail.SmtpServer = "127.0.0.1";
SmtpMail.Send(msgMail);

However this doesn't seem to work for me. I am sending to an email
address in the same domain....I just get from "Website"

Any ideas, I seem to remember that CDONTS had support for a FromName,
why don't we have this in .net????

Jul 21 '05 #3

P: n/a
I did try

msgMail.From = "Some Name <someemail>";

&

msgMail.From = "Some Name (someemail)";

no go, would the mx settings in microsoft exchange
override these coded setting??

Thanks,
Matt
"ilPostino" <ne**@ip80.com> wrote in message news:<O4*************@TK2MSFTNGP10.phx.gbl>...
The format is : Display Name <email address>

so msgMail.From = "Some Name <someemail>";

Craig
--
http://www.typemismatch.com/
(For Developers!)

"magister" <MB*********@yahoo.com> wrote in message
news:a0**************************@posting.google.c om...
Hi I am sending emails from my website. The from field usually is an
email address, but alot of email readers also seem to be able to
pickup a "from real name". I read somewhere that I can set this by
putting the name followed by the actual email address in
parathesis....like this...

MailMessage msgMail = new MailMessage();
msgMail.To = EmailAddress.Text;
msgMail.From = "funny email Website" + "(we*****@funny.net)";
msgMail.Subject = "Your Document";
msgMail.BodyFormat = MailFormat.Text;
msgMail.Body = " ";
SmtpMail.SmtpServer = "127.0.0.1";
SmtpMail.Send(msgMail);

However this doesn't seem to work for me. I am sending to an email
address in the same domain....I just get from "Website"

Any ideas, I seem to remember that CDONTS had support for a FromName,
why don't we have this in .net????

Jul 21 '05 #4

P: n/a
I did try

msgMail.From = "Some Name <someemail>";

&

msgMail.From = "Some Name (someemail)";

no go, would the mx settings in microsoft exchange
override these coded setting??

Thanks,
Matt
"ilPostino" <ne**@ip80.com> wrote in message news:<O4*************@TK2MSFTNGP10.phx.gbl>...
The format is : Display Name <email address>

so msgMail.From = "Some Name <someemail>";

Craig
--
http://www.typemismatch.com/
(For Developers!)

"magister" <MB*********@yahoo.com> wrote in message
news:a0**************************@posting.google.c om...
Hi I am sending emails from my website. The from field usually is an
email address, but alot of email readers also seem to be able to
pickup a "from real name". I read somewhere that I can set this by
putting the name followed by the actual email address in
parathesis....like this...

MailMessage msgMail = new MailMessage();
msgMail.To = EmailAddress.Text;
msgMail.From = "funny email Website" + "(we*****@funny.net)";
msgMail.Subject = "Your Document";
msgMail.BodyFormat = MailFormat.Text;
msgMail.Body = " ";
SmtpMail.SmtpServer = "127.0.0.1";
SmtpMail.Send(msgMail);

However this doesn't seem to work for me. I am sending to an email
address in the same domain....I just get from "Website"

Any ideas, I seem to remember that CDONTS had support for a FromName,
why don't we have this in .net????

Jul 21 '05 #5

P: n/a
The Exchange SMTP service can be configured to block outgoing email from
addresses it does not recognize, but I've never encountered this.

The canonical format is 'John Doe <jo*****@somedomain.com>'
--
____________________
Klaus H. Probst, MVP
http://www.vbbox.com/
"magister" <MB*********@yahoo.com> wrote in message
news:a0*************************@posting.google.co m...
I did try

msgMail.From = "Some Name <someemail>";

&

msgMail.From = "Some Name (someemail)";

no go, would the mx settings in microsoft exchange
override these coded setting??

Thanks,
Matt
"ilPostino" <ne**@ip80.com> wrote in message

news:<O4*************@TK2MSFTNGP10.phx.gbl>...
The format is : Display Name <email address>

so msgMail.From = "Some Name <someemail>";

Craig
--
http://www.typemismatch.com/
(For Developers!)

"magister" <MB*********@yahoo.com> wrote in message
news:a0**************************@posting.google.c om...
Hi I am sending emails from my website. The from field usually is an
email address, but alot of email readers also seem to be able to
pickup a "from real name". I read somewhere that I can set this by
putting the name followed by the actual email address in
parathesis....like this...

MailMessage msgMail = new MailMessage();
msgMail.To = EmailAddress.Text;
msgMail.From = "funny email Website" + "(we*****@funny.net)";
msgMail.Subject = "Your Document";
msgMail.BodyFormat = MailFormat.Text;
msgMail.Body = " ";
SmtpMail.SmtpServer = "127.0.0.1";
SmtpMail.Send(msgMail);

However this doesn't seem to work for me. I am sending to an email
address in the same domain....I just get from "Website"

Any ideas, I seem to remember that CDONTS had support for a FromName,
why don't we have this in .net????

Jul 21 '05 #6

P: n/a
The Exchange SMTP service can be configured to block outgoing email from
addresses it does not recognize, but I've never encountered this.

The canonical format is 'John Doe <jo*****@somedomain.com>'
--
____________________
Klaus H. Probst, MVP
http://www.vbbox.com/
"magister" <MB*********@yahoo.com> wrote in message
news:a0*************************@posting.google.co m...
I did try

msgMail.From = "Some Name <someemail>";

&

msgMail.From = "Some Name (someemail)";

no go, would the mx settings in microsoft exchange
override these coded setting??

Thanks,
Matt
"ilPostino" <ne**@ip80.com> wrote in message

news:<O4*************@TK2MSFTNGP10.phx.gbl>...
The format is : Display Name <email address>

so msgMail.From = "Some Name <someemail>";

Craig
--
http://www.typemismatch.com/
(For Developers!)

"magister" <MB*********@yahoo.com> wrote in message
news:a0**************************@posting.google.c om...
Hi I am sending emails from my website. The from field usually is an
email address, but alot of email readers also seem to be able to
pickup a "from real name". I read somewhere that I can set this by
putting the name followed by the actual email address in
parathesis....like this...

MailMessage msgMail = new MailMessage();
msgMail.To = EmailAddress.Text;
msgMail.From = "funny email Website" + "(we*****@funny.net)";
msgMail.Subject = "Your Document";
msgMail.BodyFormat = MailFormat.Text;
msgMail.Body = " ";
SmtpMail.SmtpServer = "127.0.0.1";
SmtpMail.Send(msgMail);

However this doesn't seem to work for me. I am sending to an email
address in the same domain....I just get from "Website"

Any ideas, I seem to remember that CDONTS had support for a FromName,
why don't we have this in .net????

Jul 21 '05 #7

This discussion thread is closed

Replies have been disabled for this discussion.