Send mail when smtp need authorization

  • Thread starter Thread starter PawelR
  • Start date Start date
P

PawelR

Hi, everbody.

How send e-mail if smtp need authorization.
If authorization is not required send email is not problem but I use
SmtpMail.Send(myMail)



PawelR
 
PawelR,

In this case, you will probably want to use something else. Jon Skeet
likes to mention the Indy project for this kind of thing, and from what I
have seen, it is pretty good:

http://www.indyproject.org

Hope this helps.
 
Using the CDOSYS schema :



MailMessage mail = new MailMessage();

....

....



mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate",
"1"); //basic authentication

mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendusername",
"myAccount"); //set your username here

mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendpassword",
"secret"); //set your password here






See further details and other schema options:

http://msdn.microsoft.com/library/d...l/_cdosys_cdoprotocolsauthentication_enum.asp



Willy.
 
hi ,
It can send mail with local SMTP server,but it cannot send with remote SMTP
server yahoo or lycos..
Does Anybody know this problem.
 
yahoo and lycos aren't exposing smtp services.

mustafa said:
hi ,
It can send mail with local SMTP server,but it cannot send with remote
SMTP
server yahoo or lycos..
Does Anybody know this problem.
 
Back
Top