avatar
c# smtpclient's atthenication# DotNet - 窗口里的风景
WB
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?
avatar
n*g
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?

avatar
n*g
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.

avatar
x*g
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
:

avatar
k*i
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?

avatar
a9
6
587?哪来的?明明是465
hotmail不支持smtp.

【在 k****i 的大作中提到】
:
: Yes.for google use port 587.
: just google it

avatar
k*i
7
465 doesn't work for some people(including me). But 587 works for me a year
back

【在 a9 的大作中提到】
: 587?哪来的?明明是465
: hotmail不支持smtp.

avatar
N*n
8

try to call sendAsync instead of send

【在 x*g 的大作中提到】
: 这个是.net 1.1的。
: 2.0下用的是smtpclient, 但是google半天
: 好像不工作。
: 谁知道在。net 2.0下如何发email? (要用
: username, password的)
:
: helps

相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。