我使用(使用C#代碼) 有我用來設計aspx頁面形式asp.net發送電子郵件和用於編寫coading在aspx.cs頁面像發送HTML頁面郵件通過C#發送
string mailto;
string mailfrom;
string name;
string subject;
string message;
string MailContent;
string cc;
SmtpClient client;
System.Net.Mail.MailMessage msg;
client = new SmtpClient();
client.UseDefaultCredentials = false;
client.Credentials = new System.Net.NetworkCredential("[email protected]", "password");
client.Port = 587;//25
client.Host = "smtp.gmail.com";
client.EnableSsl = true;
mailto ="[email protected]";
mailfrom = "[email protected]";
name = "name";
subject = "subject";
message ="hi";
msg = new System.Net.Mail.MailMessage();
msg.To.Add(mailto);
//msg.To.Add(cc);
msg.From = new MailAddress(mailfrom, name, System.Text.Encoding.UTF8);
msg.Subject = subject;
msg.SubjectEncoding = System.Text.Encoding.UTF8;
msg.Body = message;
msg.BodyEncoding = System.Text.Encoding.UTF8;
msg.IsBodyHtml = true;
msg.Priority = MailPriority.High;
try
{
client.Send(msg);
MailStatus = true;
}
catch (Exception ex)
{
ex.ToString();
MailStatus = false;
}
但我想從如上.aspx頁面中做了類似的簡單的.html頁面發送郵件? 是否有任何一種javascript或css或dll我可以用來發送電子郵件的文件?
如果喲你使用PHP ..你可以很容易地寫在你的HTML頁面的PHP標記郵件發送腳本 –