kame Posted June 20, 2011 Report Posted June 20, 2011 incerc de ceva timp sa fac in visual basic 2008 un prog care trimite mail dar nu cu smtp de la gmail cu un smtp simplu dar nu merge sa trimita si cand il bag pe ala de la gmail merge Asta e codul:Imports System.WebImports System.IOImports System.Net.MailPublic Class Form1 Private Sub btnSayHello_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSayHello.Click Dim mail As New MailMessage Dim SmtpServer As New SmtpClient SmtpServer.Credentials = New Net.NetworkCredential("kame@pule-online.eu", "ikariam1") SmtpServer.Port = 485 SmtpServer.Host = "mail.tupac.eu" SmtpServer.EnableSsl = True SmtpServer.EnableSsl = True mail.To.Add(TextBox1.Text) mail.From = New MailAddress("kame@pula-online.eu") mail.Subject = TextBox2.Text mail.Body = TextBox1.Text Dim smtp As New Net.Mail.SmtpClient("127.0.0.1", 8181) SmtpServer.Send(mail) End SubEnd ClassAm gresit ceva? Quote
c0smyn Posted June 21, 2011 Report Posted June 21, 2011 SmtpServer.Port = 25Sau portul care il are host-ul. Tu ai lasat defaultu' de la gmail. Quote