ViRiPuFF 3 Light Poster

Hi

I need to send an Email from an aspx page

I've set up my SMTP server to accept sending Email from this machine granting connection and relay to my machines IP address

In this code I'm trying to send to myself I get no errors but it does not send even if I use any other Email address

Code on the button

Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click

        'create the mail message
        Dim mail As New MailMessage()

        'set the addresses
        mail.From = New MailAddress("antina@gib.gi")
        mail.To.Add("antina@gib.gi")

        'set the content
        mail.Subject = "This is an email"
        mail.Body = "this is a sample"

        'send the message
        Dim smtp As New SmtpClient("localhost")
        smtp.Send(mail)

    End Sub

And my code in the web.config file

<system.net>
        <mailSettings>
            <smtp from="antina@gib.gi">
                <network host="localhost" port="25" defaultCredentials="true" />
            </smtp>
        </mailSettings>
    </system.net>

There are no errors but the Email does not get sent.

ViRiPuFF