Tuesday, 15 February 2011

c# - .NET SmtpMail compared with .NET SmtpClient -



c# - .NET SmtpMail compared with .NET SmtpClient -

this question has reply here:

.net: system.web.mail vs system.net.mail 7 answers system.web.mail vs system.net.mail [duplicate] 2 answers

i working .net 4.0 application uses system.web.mail.smtpmail class send emails generate, specifying bodyformat of mailformat.html.

the problem approach when generate email (using mailformat.html), protocol seems allow 76 characters per line. upon exceeding limit, rest of line seems cutting off , exclamation mark gets rendered in place.

this problematic us, , makes code extremely hard improve , refactor. noticed visual studio complains smtpmail class obsolete, , recommended alternative system.net.mail.smtpclient class. have been wondering whether changing utilize newer class offer improvements, in number of characters can exist on single line - or perhaps problem smtp protocol can't overcome.

documentation exists both of these classes there no description of differences between classes , how functionality , behaviour differs between two.

can advise on differences between obsolete , newer class sending emails , whether possible overcome 76 character per line limit.

thank you

i can tell experience there no character line limit in using system.net.mail. it's recommended use, system.web.mail obsolete. way forwards clear.

as specific api differences, system.web.mail com based, while system.net.mail in managed code. if want see different function/property names, msdn documentation available you.

system.web.mail on msdn system.net.mail on msdn

c# asp.net .net smtp smtpclient

No comments:

Post a Comment