HI all, i have been trying the code below. But alas. I read it somewhere to configure SMTP server locally.
1) Right click on Default SMTP Virtual Server and select properties
2) Select the access tab
3) Click the Relay button
4) Click the Add button
5) Type in your ip address
But there is no access time on my dialog box. Where can i specify the IP?
Below the code :
'Delcaring variables Dim From As String = txtFrom.Text Dim Subject As String = txtSubject.Text Dim Recipient As String = txtTo.Text Dim url As String = "url" 'Create an instance of the MailMessage class Dim Mailmsg As New MailMessage(From, Recipient, Subject, url) 'Assigning the mail property Mailmsg.Subject = subject Mailmsg.Body = url Mailmsg.IsBodyHtml = True Dim SMTP As New SmtpClient("127.0.0.1", 25) SMTP.DeliveryMethod = SmtpDeliveryMethod.PickupDirectoryFromIis SMTP.Send(Mailmsg)