Sen benim Mail.dll email component bakabilirsiniz:
Mail.Html(@"Html with an image: <img src=""cid:lena="""" />")
.AddVisual(@"c:\lena.jpeg").SetContentId("lena")
.AddAttachment(@"c:\tmp.doc").SetFileName("document.doc")
.To("[email protected]")
.From("[email protected]")
.Subject("Subject")
.SignWith(new X509Certificate2("SignCertificate.pfx", ""))
.EncryptWith(new X509Certificate2("EncryptCertificate.pfx", ""))
.EncryptWith(new X509Certificate2("BobsCertificate.pfx", ""))
.UsingNewSmtp()
.Server("smtp.example.com")
.Send();
Ancak özgür değil ve akıcı bir arayüz sadece sözdizimsel şeker olduğunu.
var email = Email
.From("[email protected]")
.To("[email protected]", "bob")
.Subject("hows it going bob")
.UsingTemplate(@"C:\Emailer\TransactionTemplate.htm")
.Replace("<%CurrentDate%>", DateTime.Now.ToShortDateString())
.Replace("<%FullName%>", fullName)
.Replace("<%SaleDate%>", saleDate)
Akıcı ne demek istiyorsunuz? System.Net.Mail sizin için kullanmak çok zor? Tabii ki onu saran kendi sınıfınızı yaratabilirsiniz ve bunu daha kolay ve daha basit bir hale getirebilirsiniz ... –
Şunlar gibi bir şey ister: Gönder (mesaj) .To (alıcı) .Ve (alıcı2) .From (gönderici). Şimdi(); – Phill