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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Sending an Alert Via Email

Status
Not open for further replies.

solugrp

Technical User
Jun 29, 2007
2
This is the code:

Sub VBATestSend_1()
DoCmd.SendObject acReport, "Leadman Report", "RichTextFormat(*.rtf)", _
"<dpspi@hotmail.com>", "", "", "This is a test.", "", False, ""
End Sub

But when ran:
It goes and gets the report, it attempts to locate the email profile and then I get an Run-time error '2293'(Mircosoft can't send a message for the reason in the preceding Alert) I then click 'debug' and the Module code screen appears and the whole line of code is highlighted.

I'm using Access 2000. Any help will be greatly appreciated.
 
DoCmd.SendObject uses MAPI to send e-mail... In other words it is going to send with the default e-mail program on the system (in IE check Tools, Internet options) and with the default mail profile.

You either need to set up an e-mail account or find a third party object that allows you to send e-mail. Depending on the ISP involved, sending SMTP traffic directly may violate the Terms of Service.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top