发送在线电子邮件的代码 [英] code for sending online email

查看:108
本文介绍了发送在线电子邮件的代码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我是Rahul Attarde,我想输入联系我们表格的代码并抛出联系我们"页面,我用C#发送在线电子邮件.
请帮助我解决这个问题.

Hi,
I am Rahul Attarde,i want code for contact us form and throw contact us page,i send online email in C#.
Please help me about this problem.

推荐答案

您住的地方Google坏了吗?

ASP.NET创建网页,但不发送电子邮件.您的C#代码将不在乎它是否位于ASP.NET站点中.

Google broken where you live ?

ASP.NET creates webpages, it does not send emails. Your C# code will not care that it''s in an ASP.NET site.

This[^] is how google works.


嗨希望对您有帮助
Hi I hope that help you
MailMessage MailMesaji = new MailMessage();
 MailMesaji.Subject = "Hello";
 MailMesaji.Body = " How are u";
 MailMesaji.BodyEncoding = Encoding.GetEncoding("Windows-1254");
 MailMesaji.From = new MailAddress("Email Sender @ Domain");
 MailMesaji.To.Add(new MailAddress("Email Reciever @ Domain"));
 SmtpClient Smtp = new SmtpClient("smtp.mail.yahoo.com");
 OpenFileDialog Ofd = new OpenFileDialog();
 if (Ofd.ShowDialog() == DialogResult.OK)
 {
 string Att = Ofd.FileName;
 Attachment ATTa = new Attachment(Att);
 MailMesaji.Attachments.Add(ATTa);
  
 }
  
 Smtp.Credentials = new System.Net.NetworkCredential("Email Sender @ Domain", "PWD");
 Smtp.Send(MailMesaji);
 MessageBox.Show("mail Send");


看看这个Microsoft Video教程:
使用ASP.NET发送来自网站的电子邮件 [在ASP.NET中发送电子邮件的教程 [
Have a look at this Microsoft Video tutorial:
Use ASP.NET to send Email from Website[^]
Tutorials on sending Email in ASP.NET[^]


这篇关于发送在线电子邮件的代码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆