phreaky
Regular
How can I send a simple string by using an SMTP server to an especific email address?, what's the code necessary?.
< 220 Ready
> MAIL FROM:myemail@mydomain.com
< 250 Sender ok
> RCPT TO:recipient@domain.com
< 250 Recipient ok
> DATA
< 354 Ok Send data ending with <CRLF>.<CRLF>
> sample email line!
> .
< 250 Ok, sent
> QUIT
< 221
As long as you have access to a SMTP server then System.Web.Mail will do all that you need.
Dim from As String = "from@microsoft.com"
Dim mailto As String = "to@microsoft.com"
Dim subject As String = "UtilMailMessage001"
Dim body As String = "<html><body>UtilMailMessage001 - success</body></html>"
SmtpMail.Send(from, mailto, subject, body)
string from = "from@microsoft.com";
string to = "to@microsoft.com";
string subject = "UtilMailMessage001";
string body = "<html><body>UtilMailMessage001 - success</body></html>";
SmtpMail.Send(from, to, subject, body);
Dim m As System.Web.Mail.SmtpMail
Dim sFrom, sTo, sSubject, sMessage As String
sFrom = "email@mail.com"
sTo = "email@mail.com"
sSubject = "This is a test"
sMessage = "Blah blah blah"
m.Send(sFrom, sTo, sSubject, sMessage)