Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Send a message with one line of code
- RC.Gmail.GmailMessage.SendFromGmail("username", "password", "toAddress@gmail.com", "subject", "message body");
- //Send a message with one line of code with a MailMessage object
- RC.Gmail.GmailMessage.SendMailMessageFromGmail("username", "password", mailMessageObject);
- //Use the GmailMessage object to create and send your message
- RC.Gmail.GmailMessage gmailMsg = new RC.Gmail.GmailMessage("username", "password");
- gmailMsg.To = "RCcode@gmail.com";
- gmailMsg.From = "fromAddress@gmail.com";
- gmailMsg.Subject = "C# Test Message";
- gmailMsg.Body = "Test body";
- MailAttachment attachment = new MailAttachment(@"c:\testfile.txt");
- gmailMsg.Attachments.Add(attachment);
- gmailMsg.Send();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement