关于我的迷你项目 [英] about my mini project
本文介绍了关于我的迷你项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在我的asp页面中,我想发送邮件到不同的邮件(例如:abc @ gmail.com; abc@yahoo.com; abc@live.com等等)
In my asp page i want to sent mail to different mail(for ex: abc@gmail.com; abc@yahoo.com; abc@live.com and so on..)
MailMessage mail = new MailMessage();
mail.To.Add(txtTo.Text);
//mail.To.Add("Another Email ID where you wanna send same email");
mail.From = new MailAddress("test.sathish4303@gmail.com");
mail.Subject = txtSubject.Text;
mail.Body = txtBody.Text;
mail.IsBodyHtml = true;
SmtpClient smtp = new SmtpClient();
check_mailid();
smtp.Host = "smtp.gmail.com"; //Or Your SMTP Server Address
smtp.Credentials = new System.Net.NetworkCredential("test.mail03@gmail.com", "xxxyyy");
smtp.EnableSsl = true;
smtp.Send(mail);
但这只用于g邮件。
请一些人帮助我....
推荐答案
这适用于所有ID。您可能会因为看到
Hi,
This will work for all ids. You may be confused by seeing
smtp.Host = "smtp.gmail.com";
行。
它只是 smtp
服务器名称。别担心...
虽然你收到错误,但请发给你代码,哪里有错误......
line.
It is just smtp
server name. Don''t worry about it...
Though you get error, then please send you code and where error comes....
这篇关于关于我的迷你项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文