sending an email in vb.net

jasonseay

Active member
Joined
Jun 17, 2003
Messages
29
Im having trouble sending an email in vb.net
the cdonts that i used in vb6 dont seem to work
can anyone help?
 
You can do something like this:
Code:
Dim mailmsg as new Web.Mail.MailMessage
mailmsg.from = "youremail"
mailmsg.to = "personsemail"
mailmsg.Subject = "yoursubject"
mailmsg.Body = "thebodyofmsg"
Web.Mail.SmtpMail.SmtpServer = "localhost" set the server
Web.Mail.SmtpMail.Send(mailmsg) send it
 
Mutant, at present I have my app using Outook for sending auto emails, but this only works if the user has Office2000 installed. We still have many user on Office97 so the email function does not work.

You mention web mail above, do I need any thing particular to make that work. I mean if my app was to send an auto email would it open up a browser or something?
 
It requires the SMTP service to be installed on the computer, or you could try to set the server property to something else which I never tired.
 
mutant :-
What if i change the smtp to mx4.hotmail.com (smtp of hotmail) and then send mail ;will it work then ???
P.S I dont have Smtp server installed
 
You canmake your Windows XP into an SMTP server... Just go to Control Panel -> Add/Remove programs --> Add/Remove Windows Component and activate SMTP.

-A
http://www.autojobapply.com/
[Send your resume to thousands of job-opennings within minutes! Automate your job hunt!]
 
Uhh just got it.
mailmsg.Attachments.Add(New System.Web.Mail.MailAttachment("<Filename>", Web.Mail.MailEncoding.UUEncode))
 
Back
Top