| Author: Varma Suresh 30 Oct 2009 | Member Level: Gold Points : 0 |
HI how can I send Mails from Yahoo or Hotmail can u send smtp host name
|
| Author: Gaurav Arora 30 Oct 2009 | Member Level: Gold Points : 1 |
A nice representation of code , but there is one more code which is more near to fashion written by Meetu Choudhary.
Suresh - You can check the relevant sites to get their smtp
|
| Author: Varma Suresh 30 Oct 2009 | Member Level: Gold Points : 0 |
ok thanks for u r repaly... I got it.
|
| Author: Anand 07 Dec 2010 | Member Level: Bronze Points : 1 |
please help me i am new to dot net and i unable to send mail with gmail account in vb.net windows application
i use the following code. for attachement
Dim toAddress As New System.Net.Mail.MailAddress("mailanandha@gmail.com") Dim fromAddress1 As New System.Net.Mail.MailAddress("spinsoft@vertexinfocomm.in") Dim mm As New System.Net.Mail.MailMessage(fromAddress1, toAddress) mm.Subject = "SPIN SOFT : Cotton Receipt - MCF Report for the month of " & Format(dtpStartDate, "MMMM, yyyy") Dim mailAttachment As New System.Net.Mail.Attachment("C:\123.pdf") mm.Attachments.Add(mailAttachment) mm.IsBodyHtml = True mm.BodyEncoding = System.Text.Encoding.UTF8 mm.Body = "Please find the attachment for the report in Portable Document Format." & Chr(13) & "Reports generated from Spinsoft. Spinsoft is powered by Vertex Infocomm." sendMail(mm)
and send mail function is
Sub SendMail(ByVal msg As System.Net.Mail.MailMessage) Try Dim smtpHost As String = "smtp.gmail.com" Dim userName As String = "spinsoft@vertexinfocomm.in" Dim password As String = "mypassowrd" Dim mClient As New System.Net.Mail.SmtpClient() mClient.Port = 587 mClient.EnableSsl = True mClient.UseDefaultCredentials = False mClient.Credentials = New Net.NetworkCredential(userName, password) mClient.Host = smtpHost mClient.DeliveryMethod = System.Net.Mail.SmtpDeliveryMethod.Network mClient.Send(msg)
Catch ex As Exception MessageBox.Show(ex.Message) End Try End Sub
but i got the following error:
The SMTP server requires a secure connection or the client was not authenticated. The server response was: 5.5.1 Authentication Required. Learn more at
Thank you
|