[AccessD] Sending email from Access

Stuart McLachlan stuart at lexacorp.com.pg
Tue Aug 23 16:04:47 CDT 2011


+1 for Blat.   It's got all the features I've ever needed and you can either use calls to the DLL 
version or Shell to the EXE version.   

In some situations, the EXE is preferable because you don't need admin rights to instal it 
somewhere in the DLL path.  You can keep it in the same directory as your Access 
application and user CurrentProject.Path to locate it when you build the Shell string. 


-- 
Stuart

On 23 Aug 2011 at 16:29, Jim Dettman wrote:

> Darrell,
> 
>   Are you sure all users will have Outlook?
> 
>   Personally I'd keep it simple and go with Blat or vbSendMail.  Both
>   are
> .DLL based.  
> 
>   Blat doesn't need to be registered at all, but it's not as feature
>   rich as
> vbSendMail from what I remember.  However someone on the list (Dan?)
> posted some great code to register the DLL for sendmail automatically.
>  I haven't gotten around to trying it yet and don't know if it will
> work in a non-admin situation.
> 
>   But with either, all you need to know is the IP address of a SMTP
>   server
> to send the mail and possibly an account and password depending on how
> the server is configured.  That's about as simple as it gets for
> sending mail.
> 
> Jim.
> 
> -----Original Message-----
> From: accessd-bounces at databaseadvisors.com
> [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Darrell
> Burns Sent: Tuesday, August 23, 2011 04:15 PM To: 'Access Developers
> discussion and problem solving' Subject: [AccessD] Sending email from
> Access
> 
> I'm developing an A2010 app that, among other things, needs to
> distribute email notifications to a small list of recipients. The
> recipient list is maintained in an Access table, so all I need to do
> is SEND. There are 3 obstacles I need to overcome:
> 
> 1. There are about 100 workstations, running everything from
> XP/Office2003 to Windows7/Office2010, and I can't be messing with
> their administrative options. 2. The eMails must be sent without
> operator intervention; i.e., no security pop-ups (what Outlook refers
> to as the "object model guard"). 3.  The app must be deployed as a
> runtime, preferably with no 3rd-party attachments (like Redemption).
> 
> I've developed a partial solution that makes calls to the Outlook
> object model. It gets around obstacle #1 by using late-binding so it
> won't be dependent on a particular version:
> 
> Dim objOutlook As Object
> Dim objMailItem As Object
> Const olMailItem as integer = 0
> Set objOutlook = CreateObject("Outlook.Application")
> Set objMailItem = objOutlook.CreateItem(olMailItem)
> objMailItem.Subject = strSubject
> objMailItem.Body = strBody
> objMailItem.Send
> 
> This solution works (as long as Outlook is already open); however, it
> doesn't satisfy Obstacle #2 because the security warning does pop up. 
> 
> Anybody know of a way to get around the Outlook object model guard?
> 
> Thanx!
> 
> -- 
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
> 
> -- 
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
> 






More information about the AccessD mailing list