|
I use an activeX component. I use one from activxperts.com It is extremely easy to use. It sends the email via the local SMTP server. The software is inexpensive. We purchased 11 licenses for $110. We have a process using Boston WebStation and Boston WorkStation that runs 24/7. I wrote a short program to test the process to see if it is still running or if an error has occurred. I run the test automatically every 30min. If the process has crashed, I use ActivEmail to send an email to my cell phone alerting me of the failure. Sample code is below. Declarations Section Public aeObject As AEMAILLib.SmtpMail Code section: (I put it in the form_load section) Set aeObject = CreateObject("ActivXperts.SmtpMail") When I run an automated test, the results are stored in a boolean variable "SEAup". If the app is working then I send a standard email to myself showing the results of the test. If the app has crashed, then I also page myself by sending a text message to my cell phone. Private Sub SendTextMsg() aeObject.Clear 'SMTP Server IP address can be a DNS name or an IP address aeObject.HostName = "111.111.111.111" aeObject.FromAddress = "[EMAIL PROTECTED]" If SEAup Then 'Only send regular email aeObject.Subject = Status aeObject.AddTo "[EMAIL PROTECTED]", "" aeObject.Body = TxtMsg & vbCrLf & Response & vbCrLf & "Tests Completed =" & Str(TestNum) Else 'Send email and Page Cell Phone aeObject.Subject = Status aeObject.AddTo "[EMAIL PROTECTED]", "" aeObject.AddTo "[EMAIL PROTECTED]", "" 'Cell Phone text message address aeObject.Body = Response & vbCrLf & TxtMsg End If aeObject.Send End Sub Barker-Lacerda , Michelle wrote:
-- Neil Carman Director Technical Development Manigault & Associates LLC http://www.m-allc.com Work: (805) 680-5601 Fax: (714) 968-5632 |
- [Talk] Using VBA to send email via Outlook HTaylor
- RE: [Talk] Using VBA to send email via Outl... McClain, Jeff
- RE: [Talk] Using VBA to send email via Outl... Ford, Alice
- RE: [Talk] Using VBA to send email via Outl... Zimmerman, Scott
- RE: [Talk] Using VBA to send email via Outl... HTaylor
- RE: [Talk] Using VBA to send email via Outl... Barker-Lacerda , Michelle
- Re: [Talk] Using VBA to send email via ... Neil Carman
