Click here to Skip to main content
15,891,009 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have a vb.net application.Currently I am sending mails to the customer using this Application.

To send the mail I am using following Function (Sample Function syntax):

VB
objSmtpClient = New SmtpClient("smtp.gmail.com")
            objSmtpClient.Credentials = New Net.NetworkCredential("abc@gmail.com", "XYZ")
            objSmtpClient.EnableSsl = True
            objSmtpClient.Timeout = 1234657890
                       objSmtpClient.Port = 123
            objMailMessage = New System.Net.Mail.MailMessage()
            objMailMessage.From = New MailAddress("abc@gmail.com")
            objMailMessage.Subject = HttpUtility.HtmlDecode(StrSubject.ToString().Trim())

            objMailMessage.IsBodyHtml = True
            objMailMessage.Bcc.Add(New MailAddress("cba@gmail.com"))
            objMailMessage.To.Add(txtbxEmail.Text.ToLower)
            StrBody = dt.Rows(0)("vEmailTemplate").ToString
            replaceDrpValues(StrBody, SerialKey)
            objMailMessage.Body = StrBody
            objSmtpClient.Send(objMailMessage)



Using This function I am able to send the Mail to any Email ID which is in To field.

Now the Requirement changed I don't want to Send the Mail directly from the Application.I want to save the Email as a Draft in the FROM Email Id in GMAIL.I manually Want to login to the Gmail account and then send the draft.

I want to achieve this functionality in both Web And window application.

Help Me Plz.


Awaiting for your responses eagerly.


Thank You.
Posted
Updated 29-May-14 20:55pm
v3

1 solution

Here is a solution someone came up with in Java, you could take a look at the code and port it across it what you are using;

http://stackoverflow.com/questions/5355067/programatically-save-draft-in-gmail-drafts-folder[^]
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900