Info
Version: | 2.0.2 |
Author(s): | Venetasoft |
Last Update: | Tuesday, March 4, 2014 |
.NET Fiddle: | Create the first Fiddle |
Project Url: | http://www.geekchamp.com/marketplace/components/livemailmessage |
NuGet Url: | https://www.nuget.org/packages/MailMessage |
Install
Install-Package MailMessage
dotnet add package MailMessage
paket add MailMessage
MailMessage Download (Unzip the "nupkg" after downloading)
Dependencies
Tags
Main Features:
• connects to Microsoft Live, Gmail or to a custom SMTP mail server (SSL/TLS compatible).
• supports any kind of attachment, from resource or isolated storage: pdf, mp3, wav, mp4, avi, bmp, txt, zip, jpg, etc.
• sends an email without calling EmailComposeTask and does not need user intervention.
• multithreaded: will not freeze/block your UI.
• works on wifi and data connection.
• supports international charset (Chinese).
Usage scenario:
//create a new MailMessage object
MailMessage mailMessage = new MailMessage();
//set a Live/Hotmail or Gmail, or a custom SMTP account
mailMessage.UserName= "*****@hotmail.com;
mailMessage.Password = "********";
mailMessage.AccountType = AccountType.MicrosoftAccount;
mailMessage.From = "[email protected]";
//set mail data
mailMessage.To = "[email protected]";
mailMessage.ReplyTo = "[email protected]";
mailMessage.Subject = "Hello from WP";
mailMessage.Body = "I can send any type of attachment from my app now !!"; //text or HTML
//attach ANY KIND of file from a resource or IsolatedStorage path
mailMessage.AddAttachment("\rex\file.wav");
mailMessage.AddAttachment("\myFolder\file.mp3");
mailMessage.AddAttachment("\downloads\file.mp4");
//attach from in-memory data:
mailMessage.AddAttachment(Encoding.UTF8.GetBytes("yesssss".ToCharArray()), "memoryfile.txt");
//set message event handlers
mailMessage.Error += mailMessage_Error;
mailMessage.MailSent += mailMessage_MailSent;
mailMessage.Progress += mailMessage_Progress;
//send email (async)
mailMessage.SendMail();
Support: [email protected].