Persistent Email sending error

 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("", 25)
        SMTP.DeliveryMethod = SmtpDeliveryMethod.PickupDirectoryFromIis

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s