Пишу на .Net 2.
Написал код что посылет сообщения на мыло.private void SendMail(string to, string data,string type)
{
try
{
SmtpClient client = new SmtpClient();
client.Host = ConfigurationManager.AppSettings["MailHost"].ToString();
MailMessage msg = new MailMessage(ConfigurationManager.AppSettings["MailFrom"].ToString(),
to, "New \"CurrentEvent\" subscriber - "+type+" ("+DateTime.Now.ToLocalTime().ToString()+")",data );
msg.IsBodyHtml = true;
client.Send(msg);
//Response.Write(true);
}
catch
{
Label1.Text = "Error";//Response.Write(false);
}
}
на yahoo всё приходит как надо. Но на gmail и mail.com не призодит вообще. В чём может быть причина?
/**********Comments***************************/
We trust you have received the usual lecture from the local System Administrator. It usually boils down to these three things:
#1) Respect the privacy of others.
#2) Think before you type.
#3) With gr
Данное сообщение получено с сайта GotDotNet.RU
|