I'm trying to send e-mail from an Access form, but when I try, I get an error saying "Microsoft Access can't open the mail session. Check your mail application to make sure that it's working properly." I am using MS Outlook. What's wrong?
The first troubleshooting step would be to ensure Outlook is open. If you are trying to send an email without opening Outlook (either through code or manually), you will receive this error.
The next step would be to see if you can successfully send an new email from Outlook. There may be a network or application issue that you are not aware of.
If both of these steps pass, then you need to check the reference code used to open/send the message.
Outlook is open and works fine on its own. I get the error when I simply select a table, then click file-send..., so it doesn't have anything to do with any code that was written. Any other ideas? Someone mentioned something about MAPI - I'm not really sure what that is.
MAPI is a system built into Microsoft Windows that enables different e-mail applications to work together to distribute mail. As long as both applications are MAPI-enabled, they can share mail messages with each other.
Unfortunately, my system didn't create a mail message with the table as an attachment either. The best bet may be to write a macro and send it that way.
You can write a macro or use the sendobject command - whichever is more comfortable for you. To write a macro, open the macro tab in Access, and use the SendObject function. You will need to specify the name of the table, the recipients and the format of the attachment.
Then, if necessary, you can create a command button and choose the "run macro" action in the miscellaneous category.
Choose the Macro you just created and label it.
Creating a Macro may not be the answer. I faced this problem previously (using Access97). Sending the email worked from some machines but didn't from others, regardless of whether Outlook was open. We compared all settings and couldn't find the answers. This was never resolved, please post if you find a good answer. Thanks.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.