Forum » Programiranje » Vb.net pošiljane pošte SMTP Amis
Vb.net pošiljane pošte SMTP Amis
simkle ::
Pozdravljeni,
imam težavo pri pošiljanju elektronske pošte iz VB.net. Če pošiljam preko GMAILa mi normalno pošlje s spodnjo kodo. Pošiljanje preko amis naslova pa ne gre.
Port: 465
Strežnik: smtp.amis.net
Ima kdo kakšno idejo?
lp
Try
Dim SmtpServer As New SmtpClient()
Dim mail As New MailMessage()
SmtpServer.Credentials = New _
Net.NetworkCredential("primer8@gmail.com", "pass")
SmtpServer.Port = 587
SmtpServer.Host = "smtp.gmail.com"
SmtpServer.EnableSsl = True
SmtpServer.DeliveryMethod = SmtpDeliveryMethod.Network
'SmtpServer.UseDefaultCredentials = True
mail = New MailMessage()
mail.From = New MailAddress("primer@gmail.si", "IME ZA PRIKAZ")
mail.To.Add("krneki@krneki.si")
mail.Subject = "Test Mail"
mail.Body = "This is for testing SMTP mail from GMAIL"
SmtpServer.Send(mail)
MsgBox("mail send")
Catch ex As Exception
MsgBox(ex.ToString)
End Try
imam težavo pri pošiljanju elektronske pošte iz VB.net. Če pošiljam preko GMAILa mi normalno pošlje s spodnjo kodo. Pošiljanje preko amis naslova pa ne gre.
Port: 465
Strežnik: smtp.amis.net
Ima kdo kakšno idejo?
lp
Try
Dim SmtpServer As New SmtpClient()
Dim mail As New MailMessage()
SmtpServer.Credentials = New _
Net.NetworkCredential("primer8@gmail.com", "pass")
SmtpServer.Port = 587
SmtpServer.Host = "smtp.gmail.com"
SmtpServer.EnableSsl = True
SmtpServer.DeliveryMethod = SmtpDeliveryMethod.Network
'SmtpServer.UseDefaultCredentials = True
mail = New MailMessage()
mail.From = New MailAddress("primer@gmail.si", "IME ZA PRIKAZ")
mail.To.Add("krneki@krneki.si")
mail.Subject = "Test Mail"
mail.Body = "This is for testing SMTP mail from GMAIL"
SmtpServer.Send(mail)
MsgBox("mail send")
Catch ex As Exception
MsgBox(ex.ToString)
End Try
Poldi112 ::
Ko rešeš da ne gre - kaj konkretno ti javi?
Where all think alike, no one thinks very much.
Walter Lippmann, leta 1922, o predpogoju za demokracijo.
Walter Lippmann, leta 1922, o predpogoju za demokracijo.
simkle ::
Pomoje je problem pri "Authentication method". Nevem kako nastavit: "Authentication method: Normal password"....
simkle ::
Sem rešil zadevo:
Dim SmtpClient As SmtpClient = New SmtpClient()
Dim basicCredential As New NetworkCredential
basicCredential.UserName = "uportabniskoime"
basicCredential.Password = "geslo"
Dim MailMessage As New MailMessage()
Dim fromAddress As New MailAddress("krneki@amis.si")
SmtpClient.Host = "smtp.amis.net"
SmtpClient.EnableSsl = True
SmtpClient.UseDefaultCredentials = False
SmtpClient.Credentials = basicCredential
MailMessage.From = fromAddress
MailMessage.Subject = "your subject"
MailMessage.Body = "body"
MailMessage.To.Add("krneki@gmail.si")
Try
SmtpClient.Send(MailMessage)
Catch ex As Exception
MsgBox(ex.ToString)
End Try
Dim SmtpClient As SmtpClient = New SmtpClient()
Dim basicCredential As New NetworkCredential
basicCredential.UserName = "uportabniskoime"
basicCredential.Password = "geslo"
Dim MailMessage As New MailMessage()
Dim fromAddress As New MailAddress("krneki@amis.si")
SmtpClient.Host = "smtp.amis.net"
SmtpClient.EnableSsl = True
SmtpClient.UseDefaultCredentials = False
SmtpClient.Credentials = basicCredential
MailMessage.From = fromAddress
MailMessage.Subject = "your subject"
MailMessage.Body = "body"
MailMessage.To.Add("krneki@gmail.si")
Try
SmtpClient.Send(MailMessage)
Catch ex As Exception
MsgBox(ex.ToString)
End Try
Vredno ogleda ...
Tema | Ogledi | Zadnje sporočilo | |
---|---|---|---|
Tema | Ogledi | Zadnje sporočilo | |
» | Visual BasicOddelek: Programiranje | 3417 (2443) | cekr |
» | Pomoč pri kontakt formiOddelek: Izdelava spletišč | 18488 (18386) | Vzdevek |
» | [C#] Simobilov GlasnikOddelek: Programiranje | 4327 (1407) | Mrch |
» | [ASP.NET] send mailOddelek: Programiranje | 1260 (1197) | Microsoft |
» | Poslijanje majla preko SMTP (IIS); kako?Oddelek: Omrežja in internet | 1670 (1587) | Microsoft |