StrataFrame Forum
Home      Members   Calendar   Who's On
Welcome Guest ( Login | Register )
      


««12

Properly Handling Exception HandlingExpand / Collapse
Author
Message
Posted 06/05/2008 1:01:19 PM
StrataFrame VIP

StrataFrame VIPStrataFrame VIPStrataFrame VIPStrataFrame VIPStrataFrame VIPStrataFrame VIPStrataFrame VIPStrataFrame VIP

Group: StrataFrame Users
Last Login: 2 days ago @ 7:28:14 PM
Posts: 1,280, Visits: 3,259
Oh, how did you send the email? I've been thinking about doing this also, and am investigating ways of doing it.
Post #16862
Posted 06/06/2008 8:42:08 AM


StrataFrame Developer

StrataFrame Developer

Group: StrataFrame Developers
Last Login: Today @ 4:11:57 AM
Posts: 4,586, Visits: 4,570
.NET actually has some good SMTP classes for sending emails.  Here is a simple example (I went ahead and showed how to authenticate as this is generally the next question.  If you are mailing from an internal server that will relay your message you might not need this, but I thought it would help.  Also, you can format the mail message to support HTML, etc.  I just showed you the basics.

Dim smtp As New System.Net.Mail.SmtpClient("mymail.server.com")
Dim mailItem As New System.Net.Mail.MailMessage("myEmail@somewhere.com", _
                                                "someone@there.com", _
                                                "Howdy", _
                                                "Here is the body")

smtp.Credentials = New System.Net.NetworkCredential("MyUserName", "MyPassword")
smtp.Send(mailItem)
Post #16882
Posted 06/06/2008 11:44:05 AM
StrataFrame VIP

StrataFrame VIPStrataFrame VIPStrataFrame VIPStrataFrame VIPStrataFrame VIPStrataFrame VIPStrataFrame VIPStrataFrame VIP

Group: StrataFrame Users
Last Login: 2 days ago @ 7:28:14 PM
Posts: 1,280, Visits: 3,259
Thanks Trent. I've heard that this can fail because ISPs block mail sent to servers outside of their domain. Is this something you've heard of? I.e. I'm accessing the internet via a wireless connection at a hotel or using the network connection at a client site, attempt to send an email via the SMTP server at my company and the hosting network blocks the email.
Post #16885
Posted 06/06/2008 2:18:31 PM


StrataFrame Developer

StrataFrame Developer

Group: StrataFrame Developers
Last Login: Today @ 4:11:57 AM
Posts: 4,586, Visits: 4,570
Is this something you've heard of?

Thus the credentials.  If you supply a mail server, port, and credentials...that's email...period   We use this everywhere.  The only thing that you cannot do is pull mail down from a POP3 server...but sending...no problem

Post #16888
Posted 06/06/2008 4:06:53 PM
StrataFrame VIP

StrataFrame VIPStrataFrame VIPStrataFrame VIPStrataFrame VIPStrataFrame VIPStrataFrame VIPStrataFrame VIPStrataFrame VIP

Group: StrataFrame Users
Last Login: 2 days ago @ 7:28:14 PM
Posts: 1,280, Visits: 3,259
Very cool! Thanks!
Post #16894
« Prev Topic | Next Topic »

««12

Reading This TopicExpand / Collapse
Active Users: 0 (0 guests, 0 members, 0 anonymous members)
No members currently viewing this topic.
Forum Moderators: Ben Chase, Trent L. Taylor, Steve L. Taylor

PermissionsExpand / Collapse

All times are GMT -6:00, Time now is 9:36am

Powered by InstantForum.NET v4.1.4 © 2008
Execution: 0.109. 8 queries. Compression Enabled.
Site Map - Home - My Account - Forum - About Us - Contact Us - Try It - Buy It

Microsoft, Visual Studio, and the Visual Studio logo are trademarks or registered trademarks of Microsoft Corporation in the United States and/or other countries.