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:
Message
I'm weeding through all my email, so I'm not sure if someone responded the same way I'm about to...
 
I have several scripts that use Outlook to send alerts or log files, etc. When I was writing them I had massive problems getting around MS Outlooks security settings. Someone on this listserv finally told me about a couple applications to try that would send the email directly from the Exchange server. The one I settled on was AspEmail (http://www.aspemail.com) by Persits software. You can download it from their website and they give you code snippets which you can plug into your script to get it to run.
 
The only problem I ran into was with "Relaying" in Exchange. I wanted my email to go to an address outside our domain. Our Exchange settings require a valid user account to use relaying. You can enter your own (or a system) domain account into your code (not real secure), or you could have your Exchange engineer allow relaying for the domain in your address.
 
Michelle
 
617-665-3432 office
857-998-9290 cell
617-546-7770 pgr.
PACS Application Analyst
CHA Information Technology
[EMAIL PROTECTED]
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] On Behalf Of [EMAIL PROTECTED]
Sent: Monday, August 01, 2005 2:49 PM
To: [email protected]
Subject: [Talk] Using VBA to send email via Outlook

I could spend a whole bunch of time looking around the web to try to find what I need, but I'm hoping someone on the listserv has done this and would be willing to share some code. We are switching from using Lotus Notes ot using Outlook at the end of this month. I need to rewrite all of my scirpts that use email to use the new client. Is anyone out there doing this? If so, would you be willing to share your code?

Henry Taylor
Technical Analyst II
Lutheran Health Network
Ph. (260) 425-3914


-- 
Neil Carman
Director Technical Development
Manigault & Associates LLC

http://www.m-allc.com
Work: (805) 680-5601
Fax:  (714) 968-5632

Reply via email to