send e-mail programmatically from Access 2007 VBA

  • Thread starter Thread starter GY2
  • Start date Start date
G

GY2

Running Access2007 on Windows Server2003 Enterprise SP2.
I have a simple code module which creates a recordset filled with records
returned by a query run against the currentdatabse.

Now, from the same code module, I want to sent e-mails which contain some of
those records as the e-mail text.

I've searched the web but have not found any clear explanation of code--or
even a process--that will work in Access 2007.

I'm looking for something that will require the fewest references possible
and, ideally, no user controls, just some calls to some common dll or .Net
entity which I can be assured is installed on this server box.

I have the address of my company's SMTP server; I just need to know how to
start a conversation with it.

Any clues, much less code examples, would be greatly appreciated.
 
Search these forums for "SMTP" and you'll find the code. Not sure what you're
doing, but there is also a (not free!) mod from FMS (Total Access Emailer)
that emails using SMTP. These are designed, typically, to export reports as
PDFs, or something similar. FMS is pretty robust. If you're need is to export
"some of these records as e-mail text", create a recordset with the email
address and the text and use the FMS module to send emails as reports or
whatever. I have printed the SMTP instructions, but can't put my fingers on
them at the moment.
 
Back
Top