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

C# SMTP Mail question

P: n/a
Hi,

In my C# Windows Form, TcpClient.
I can send mail with this one:

Mail From: Jason@com
Rcpt To: John@com
Data
From:AB
Subject:Topic AB
Test
..
However, this one doesn't work:

Mail From: Jason@com
Rcpt To: John@com
Data
From:A B
Subject:Topic AB
Test
..
The only difference is the
From:AB
From: A B

Would someone tell me how to fix it?
Thanks for help.
Jason
Jan 26 '07 #1
Share this Question
Share on Google+
2 Replies


P: n/a
What var is AB? You trying to set two froms? like from mr*@a.com and
Mr*@b.com? Or is it just a name with a space in it? if so have you tried
doing this:

string myFromName = "Jason Orange";

Then set from to that. myMail.From = myFromName;

Let me know how you get on

"Jason Huang" <Ja************@hotmail.comwrote in message
news:u3**************@TK2MSFTNGP05.phx.gbl...
Hi,

In my C# Windows Form, TcpClient.
I can send mail with this one:

Mail From: Jason@com
Rcpt To: John@com
Data
From:AB
Subject:Topic AB
Test
.
However, this one doesn't work:

Mail From: Jason@com
Rcpt To: John@com
Data
From:A B
Subject:Topic AB
Test
.
The only difference is the
From:AB
From: A B

Would someone tell me how to fix it?
Thanks for help.
Jason

Jan 26 '07 #2

P: n/a
Thanks Daniel!
It is just a space in it.
"Daniel" <no****@pokercat.co.ukglsD:uO*********** ***@TK2MSFTNGP06.phx.gbl...
What var is AB? You trying to set two froms? like from mr*@a.com and
Mr*@b.com? Or is it just a name with a space in it? if so have you tried
doing this:

string myFromName = "Jason Orange";

Then set from to that. myMail.From = myFromName;

Let me know how you get on

"Jason Huang" <Ja************@hotmail.comwrote in message
news:u3**************@TK2MSFTNGP05.phx.gbl...
>Hi,

In my C# Windows Form, TcpClient.
I can send mail with this one:

Mail From: Jason@com
Rcpt To: John@com
Data
From:AB
Subject:Topic AB
Test
.
However, this one doesn't work:

Mail From: Jason@com
Rcpt To: John@com
Data
From:A B
Subject:Topic AB
Test
.
The only difference is the
From:AB
From: A B

Would someone tell me how to fix it?
Thanks for help.
Jason


Jan 29 '07 #3

This discussion thread is closed

Replies have been disabled for this discussion.