WB 发帖数: 170 | 1 how to set the auth para with smtpclient class,
my smtp server need auth.
for google or hotmail can i use this class to send email? |
n*********g 发帖数: 75 | 2 you can pass in username and password
using some properties.
【在 WB 的大作中提到】 : how to set the auth para with smtpclient class, : my smtp server need auth. : for google or hotmail can i use this class to send email?
|
n*********g 发帖数: 75 | 3 here is an exmaple to use a mail sever that need authentication, hope it helps
.
MailMessage mail = new MailMessage();
mail.To = to;
mail.From = from;
mail.Subject = sub;
mail.Body = body;
mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate", "1"); //basic authentication
mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendusername", user); //set your username here
【在 n*********g 的大作中提到】 : you can pass in username and password : using some properties.
|
x*g 发帖数: 689 | 4 这个是.net 1.1的。
2.0下用的是smtpclient, 但是google半天
好像不工作。
谁知道在。net 2.0下如何发email? (要用
username, password的)
helps
【在 n*********g 的大作中提到】 : here is an exmaple to use a mail sever that need authentication, hope it helps : . : MailMessage mail = new MailMessage(); : mail.To = to; : mail.From = from; : mail.Subject = sub; : mail.Body = body; : mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate", "1"); //basic authentication : mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendusername", user); //set your username here :
|
k****i 发帖数: 1072 | 5
Yes.for google use port 587.
just google it
【在 WB 的大作中提到】 : how to set the auth para with smtpclient class, : my smtp server need auth. : for google or hotmail can i use this class to send email?
|
a9 发帖数: 21638 | 6 587?哪来的?明明是465
hotmail不支持smtp.
【在 k****i 的大作中提到】 : : Yes.for google use port 587. : just google it
|
k****i 发帖数: 1072 | 7 465 doesn't work for some people(including me). But 587 works for me a year
back
【在 a9 的大作中提到】 : 587?哪来的?明明是465 : hotmail不支持smtp.
|
N********n 发帖数: 8363 | 8
try to call sendAsync instead of send
【在 x*g 的大作中提到】 : 这个是.net 1.1的。 : 2.0下用的是smtpclient, 但是google半天 : 好像不工作。 : 谁知道在。net 2.0下如何发email? (要用 : username, password的) : : helps
|