I'd like to send a mail with the contents of 2 textboxes to my email adres.
I have been following some tutorials on the internet about doing this and came onto this code.
This works, until it gives an error after a while (translated):
What do i do ?
I'm using vb.net 2003, i'd like to use gmail as reciever of the mails.
If you need any more info just ask here, or pm me
Pieter.
I have been following some tutorials on the internet about doing this and came onto this code.
VB.NET:
Dim my_email As System.Web.Mail.SmtpMail
Dim from As String = "emailadres@emailsadres.com"
Dim mailto As String = "myemailadres@GMAIL.com"
Dim subject As String = "test"
Dim body As String = txtName.Text & " " & txtFirstname.Text
my_email.SmtpServer = "smtp.gmail.com"
my_email.Send(from, mailto, subject, body)
This works, until it gives an error after a while (translated):
VB.NET:
An unhandled exception of type 'System.Web.HttpException' occurred in system.web.dll
Additional information: Can't get access to the object: CDO.Message.
What do i do ?
I'm using vb.net 2003, i'd like to use gmail as reciever of the mails.
If you need any more info just ask here, or pm me
Pieter.