Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Send simple email behind form 1

Status
Not open for further replies.

tsonnenl

Programmer
Apr 8, 2002
65
US
Hi-
The solutions that I have found for this using the .SendObject command seem to be much more complex than what I am trying to do. I want an email to be generated and sent with a message body that is something like:

"Your " & me.ordertype & "order has been confirmed. The work will be completed on " & me.duedate

I don't really need a whole object or recordset sent, just a more simple string. Two other considerations are that I need the sender name and address to be a generic one and not that of the local machine (ex. Our Company, customerservice@company.com NOT Bob, bob@company.com) and that I need it to be run in the background so that the user is not aware.

I apologize if this has been gone over before. Is anyone else surprised at how much they miss the search? Thanks in advance.

Todd
 
Well, the easiest way is to use SendObject without specifying a object. This also takes a True/False parameter which lets you specify whether or not to open the message for editing before sending - you could use this to send the message in the background, i.e.

Code:
DoCmd.SendObject , , , "customerservice@company.com  ", , , "Notification mail", "Your " & Me.OrderType & "order has been confirmed.  The work will be completed on " & Me.DueDate, False

There are a couple of things to remember though - one of the recent service packs for Outlook makes you explicitly grant your program permission to send an e-mail. You have to click "Yes" on a message box before the e-mail is sent - this was introduced as a virus protection method in the wake of the Melissa and LoveBug viruses.

Secondly, SendObject is buggy in Access 2000 - for more details, see - MS offer a basic workaround, and there's a more comprehensive version that enables message priorities, voting buttons and the 'From' address to be set at (note: both the MS workaround and the feature-rich alternative are dependant on you using Outlook to send your mail).

HTH [pc2]
 
Thanks! Luckily everyone is using Outlook, so the module on brinkster works very well.

Is there any better way to address the 'From' issue though? The .SentOnBehalfOfName isn't exactly what I'm looking for. From the point of view of the recipient of this email, I don't want any obvious way to tell which one of the Customer Service Reps sent the email out. I want any replies to go to the generic address and not the users address also. It seems like there should be a way to send an email without linking it to the local email account...
 
[2thumbsup] MP9, your tip really worked for me. Thanks for being here for none technical folks like myself. I have just learn to read through the forum and most of the time the answers are there.

Always grateful
Brenda [elephant2]

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top