SMTP Mail

A

aslantifosi

hi all,
My question is about that i use a smpt server which is running on a different machine from my webserver machine. And i can authenticate with a user and password. I use SmtpMail class. i set the smtpserver property. but how can i authenticate with my user and pass?

for ex:
my user :[email protected]
pass :12345

Message.From = myuser;
Message.To=strTo;

Message.Subject=strSubject;

Message.Body = strBody;

try

{

SmtpMail.SmtpServer = "172.19.1.123";

SmtpMail.Send(Message);

}

catch(System.Web.HttpException ehttp)

{



}
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,982
Messages
2,570,190
Members
46,736
Latest member
zacharyharris

Latest Threads

Top