What code can my program Email me with if a condition happens?

T

Trint Smith

How can I do this if a certain event happens within my program? Can I
use a hotmail.com account or one of the tribidz.com that comes with my
hosting account? Is there a free way to do it?

Dim email As New System.Web.Mail.MailMessage
email.To = "(e-mail address removed)"
email.From = "(e-mail address removed)"
email.Body = "Message Text"
email.Subject = "Subject Text"
email.BodyFormat = Web.Mail.MailFormat.Html
System.Web.Mail.SmtpMail.SmtpServer = "" '"mail.tribidz.com"
System.Web.Mail.SmtpMail.Send(email)

Thanks,
Trint
..Net programmer
(e-mail address removed)
 
C

CJ Taylor

Trint,

You should be using the SMTP server that came with your hosting account (I'm
assuming its tribidz), however, what is with all the quote marks in there?
But otherwise, looks fine to me on the outside.

the reason you can't use Hotmail is because of something called "open-relay"
which is a vulnerability within the mail protocol that has been raped by
spammers.
you can read more about it at

http://mail-abuse.org

-CJ
 
J

Jay B. Harlow [MVP - Outlook]

Trint,
My understanding is as long as you give a valid SMTP server for:
System.Web.Mail.SmtpMail.SmtpServer = "" '"mail.tribidz.com"

It will send the email.

Just remember it needs to be the name of the tribidz SMTP server (not POP3
server).

Of course you realize you will need to be on-line.

Hope this helps
Jay
 
C

Chris Barrell

you cannot send messages e-mails to hotmail accounts this way. By the way,
the se3rver should be the one for the to address. Hotmail has a new security
feature thats wwhy.
 
J

Jay B. Harlow [MVP - Outlook]

Chris,
I'm able to use Trint's code and send to a hotmail account, as long as the
From address matched the smtp server's "address".

What appears to be blocked is if you attempt to say you are to a hotmail
account & from a "hotmail" account. Which is understandable.

Hope this helps
Jay
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top