JWColby
jwcolby at colbyconsulting.com
Sun Jun 18 22:00:47 CDT 2006
Stuart, >Do you want it to send through an email client? Not if I need to know the details of the email client. The code must just "send the email", not care whether it is going out via outlook, outlook express or some other thing. >Do you want it sent direct to an SMTP Server? No idea. What is an SMTP server and why do I care? Again, the code must just send the email, regardless of what computer it is installed on, regardless of what network it is on, regardless of... Anything else you can think of. >What is your actual requirement? A piece of code, written in Access VBA, that will AUTOMATICALLY AND WITHOUT USER INTERVENTION send an email message, complete with an attachment, regardless of where the Access Application is installed, regardless of what email client the application or computer user normally uses, and regardless of the version of Windows. >If you want to send using the email client, then a simple call to DocmdSendObject will do it. I just tried this: docmd.SendObject ,,,"jwcolby at colbyconsulting.com",,,"test sending an email","This is a drill, this is a drill" And all it did was open an outlook email, place the parameters in various places, and wait. Not exactly "automatic". Likewise, as far as I can tell no way to add an attachment unless the attachment is an Access object. There are many instances where the attachment needs to be a text log file from the disk, an Excel or Word or PDF document etc. I need: A piece of code, written in Access VBA, that will send an email message, complete with an attachment, regardless of where the Access Application is installed, regardless of what email client the application or computer user normally uses. It must NOT require installation of a DLL, knowledge of a specific email client, calls to methods of a specific email client, reference to a library (unless that library is ALWAYS available on EVERY Windows computer). I don't ask for much, just email. ;-) John W. Colby Colby Consulting www.ColbyConsulting.com -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Stuart McLachlan Sent: Sunday, June 18, 2006 9:14 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] email from outlook On 18 Jun 2006 at 20:08, JWColby wrote: > I know this has gone around many times and I hang my head in shame to > even ask again, but is there a "no brainer, no nonsense" way to send > email from VBA code, that will just work, without needing to have any > specific email client installed. > It depends. Do you want it to send through an email client? That gives you the opportunity to save a proper "Copy To Self" or "Sent Mail" copy for reference purposes. It also allows you to have an option to "Edit before sending" if the email is createdby a user rather than an automated process. It also sometimes requires the email client to be already running on the clinet machine (especially if the client is Outlook and you have multiple profiles set up. Do you want it sent direct to an SMTP Server? This doesn't work if the you are on a corporate LAN where users only have email access through something like Exchnage Server with no SMTP module active. What is your actualy requirement? -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com