Understanding email

ellenr

Registered User.
Local time
Today, 17:38
Joined
Apr 15, 2011
Messages
400
I have written an Access program with its tables in backend odbc db online, shared with about ten ladies for keeping up with organization's membership. One important feature is the ability to send emails to any member whose "send email" box is checked. The vba routine uses old cdo code and for the most part works well. In an effort to have bounces go to the sender (rather than the organization's generic email), each user enters their home isp's email credentials (email addr., password, etc) which are then used by the cdo code. She specifies the return address, sender name, subject, attachment, etc. What happens if a user takes her laptop to her office or Starbucks? Do bounces still go to her home isp email? Or, has anyone figured out a way to get bounces to go a specified email address via cdo code? Is there any other way to provide email capabilities to users other than cdo? I also have a user with an bellsouth isp. She cannot get email to work at all. ATT tells me that even though they block port 25, there should never be a problem sending out port 465. I haven't found that to be the case, as she has tried that. I also have a user with a gmail address--she can send from home ( I assume no isp restrictions there) but cannot send at a friend's home or from her office. If can't send using home wifi/isp setup I can use phone hotspot? And, if I do, where do bounces go?

I would appreciate it if any of you experts would weigh in and help me understand what I need to know to handle these problems. Any comments will be appreciated.
 
Last edited:
So you got a lot of questions with a lot of possibilities.

1) bouncebacks - the way you have it set up, bounces will go to the sender. One way around this is to have each user set an email filter to forward bounce messages to one particular address.
2) Using Starbucks, wherever won't matter much if the email is able to send out. To do that it has to authenticate with the email domain. some places restrict such connections for authenticating. Some home ISP's won't allow ports out to other isp's mail servers - although usually webmail is okay as it's known ports (80, 443).
3) Port 465 may or may not work - it depends how you are attempting to authenticate. The server you are authenticating against may not allow port 465.
 
To make your "bounces" go to a specific address using CDO, in the message you fill in the targeted "bounce" recipient as the .From property of the message, in essence overriding the default for that property (to match the .Sender). The .Sender property and the .From property do not have to match.

As to using something else besides CDO, the only other method I've ever tried is that you set up Outlook so that you can manually send messages through your ISP, which means that you have to set up a sender port and a receiver port for a POP3 server (which is what I use on bellsouth.net) and SMTP server. You can set up the encrypted ports for both SMTP and POP3 in Outlook by doing a File --> Account Settings, find or create the account name you need, and start filling in the blanks. The Outlook wizard will help you at least somewhat if you tell it you have a new account to create. You will need to talk to your ISP representative to get the correct port numbers and server names for your account's inbound and outbound channels, which are separate.

Once the account is correct, you set up your code to launch an Outlook Application object, and there are tons of articles on this forum about doing so. It is a bit more tricky because for Outlook, you have to first try to do a .GetObject for Outlook before you would a .CreateObject, because Outlook won't allow a second instance of itself to run.

You might have to look up some of these terms using the great Google brain...

Once the app is open, you need to do a GetNamespace("MAPI") to get to the right part of Outlook. Then you do a .GetDefaultFolder(olFolderOutbox) to point to the Outbox folder. After that, you do a {foldername}.Items.Add(olMailItem) to create a blank message. Once you have the message, its properties are exposed and you can define .To, .CC, .SentOnBehalfOf, .Subject, .Body (and .BodyFormat, if you are doing HTML vs. Plain Text), and anything else you need.

If you need things like digital signatures or encryption, you need to open the Inspector (another type of object within Outlook) to expose the message properties for those special features. Once you complete the signing and encryption options, the only thing left is to .Send the message. Depending on how you actually implemented this, you will need to reset any object variables (to Nothing) before you leave your routine.

All of this can be read from the Outlook Help files on-line. Access Help won't know the rules about Outlook and its myriad number of object types, but Outlook itself will be able to find what you want.
 
Thank you The_Doc_Man. I have added .sender to my code and that seems to work. Still have a few issues, so I may be back, but this solves one.
 

Users who are viewing this thread

Back
Top Bottom