Wich is the shortest and easyest way to send mail with NET?

  • Thread starter Thread starter Crirus
  • Start date Start date
Hi Crirus,

For your solution I think it only can be SMTP

This I did gave as answer to Wojciech yesterday, you have to change
"wiadomosc" in "information" or whatever word in the Rumanian language
search for the rest on/in mdsn, this is just start but quiet complete I
thought.

\\\\
Dim wiadomosc As Web.Mail.MailMessage = New Web.Mail.MailMessage
Dim config As MailAttachment = New
MailAttachment("c:\test1\test.txt")
wiadomosc.Attachments.Add(config)
wiadomosc.From = xxx@xxx
wiadomosc.To = xxx@xxx
wiadomosc.Subject = "..."
wiadomosc.Body = "..."
wiadomosc.BodyFormat = Web.Mail.MailFormat.Text
System.Web.Mail.SmtpMail.SmtpServer = "xxxx.xxxx.xx"
System.Web.Mail.SmtpMail.Send(wiadomosc)
///

Cor
 
Hi Armin,

Not a wrong answer, but Crirus did in my opinion not ask "how", but what is
the best, that opinion is difficult to find in the newsgroup.

But when you did read it as "how" I fully agree with your answer.

Cor
 
Crirus said:
I cant find that namespace for mail!

At the bottom of the documentation of the class you want to use, you can
find the assembly (containing the class) to be referenced.
 
Back
Top