Access Sens email withiut Outlook (1 Viewer)

Moore71

DEVELOPER
Local time
Today, 20:43
Joined
Jul 14, 2012
Messages
158
Hi,
Please I have the following fields of a form:
txtSender
txtReceiver
txtSubject
txtbody
btnSend

My email configuration is:
ayz@gmail.com
password: omniFavor2010

Please someone use these data to show me what and how to insert code for send email from access 2010 in the absence of outlook installed on my system.
Thank you in advance
 

The_Doc_Man

Immoderate Moderator
Staff member
Local time
Today, 14:43
Joined
Feb 28, 2001
Messages
27,332
Just to emphasize one point... You need to be sure that you have an SMTP relay system because without it, you can't send e-mail this way. Not saying ANY of Colin's code is wrong, but this is something outside the code. It appears you MAY have what you need, but it needs testing.

Here's the short explanation. To send mail, you need to use a sequence of transmissions based on a protocol called Simple Mail Transfer Protocol (SMTP). You send your SMTP traffic to a mail relay server that implements the "store and forward" model of mail transfers. (If some thing is described as a mail relay server, it DOES use that model.)

If you use Outlook, you had to configure your mail account with the address of your SMTP mail relay when you first set up the account. If you want to use CDO (Collaborative Data Objects), you need to have the same SMTP information including the name or address of the mail relay server. It is one of the parameters you must supply when trying to send a message.

The catch is not that you can't send the mail with CDO, but rather that you can't send ANY mail without an SMTP relay host and account (and, of course, credentials such as password or some sort of encrypted key setup, one or the other.) As long as you have the requirements, CDO will send SMTP mail just as Outlook would, even using the same SMTP methods.

Note, however, that you cannot receive mail this way. You would need to set up an SMTP server / daemon on your system if you wanted inbound SMTP e-mail, or you would need to implement some version of Post Office Protocol (currently, POP3). To get your mail on your own machine would imply other things like having a recognized domain so that general routers would be able to find you; i.e. you would have to publish your address. But for sending only? Your address is not usually required to have been published.
 
Last edited:

isladogs

MVP / VIP
Local time
Today, 20:43
Joined
Jan 14, 2017
Messages
18,258
All true
The app requires you to enter the email account settings (unless you are using Outlook in which case it should already have been setup)

This is part of the settings screen in one of my apps showing the 8 settings that need to be entered correctly to send email without using Outlook



Note that the send email address chosen can be genuine but it doesn't have to be so. Dummy addresses can be used for various purposes such as do not reply addresses as well as for less salubrious reasons

Attached is a help file listing most of the likely error messages if the settings are incorrect and the causes for each
 

Attachments

  • EmailSettings.PNG
    EmailSettings.PNG
    22.1 KB · Views: 258
  • EMailHelp.zip
    441.3 KB · Views: 66

The_Doc_Man

Immoderate Moderator
Staff member
Local time
Today, 14:43
Joined
Feb 28, 2001
Messages
27,332
Note also that it IS possible to use one name as "From" but have a "Reply To" value in case you wanted to send mail FROM machine X but get replies from machine Y (presuming Y has Outlook or can directly receive SMTP traffic or uses POP3). If you are using VBA to set up everything else, you can set that up in passing.
 

jdraw

Super Moderator
Staff member
Local time
Today, 15:43
Joined
Jan 23, 2006
Messages
15,396
Moore71,
In addition to the info you have received, you should not post important password info,
You could advise a responder that you can PM (private message) that kiind of info, but, if the password is real/operational,
I would suggest you do not broadcast it publicly.
If you have a sample test database, with test records and a test login, then that's a different situation.
Bottom line -be cautious with distributing private/personal info.

Good luck.
 
Last edited:

arnelgp

..forever waiting... waiting for jellybean!
Local time
Tomorrow, 03:43
Joined
May 7, 2009
Messages
19,246
there is a VB6 Mailing program on
Planet-source-code. It doesn't use
CDO, only Winsock. i have not yet
touch the source to convert to
MSAccess. but i believe it will
do the trick. I have x64 office and
windows and glad that my system
has mswinsck.ocx. Unfortunately,
it is still in my TODO list, since
i don't have internet on my pc,
only on my phone.

if you are interested visit the site.
 

Moore71

DEVELOPER
Local time
Today, 20:43
Joined
Jul 14, 2012
Messages
158
All true
The app requires you to enter the email account settings (unless you are using Outlook in which case it should already have been setup)

This is part of the settings screen in one of my apps showing the 8 settings that need to be entered correctly to send email without using Outlook



Note that the send email address chosen can be genuine but it doesn't have to be so. Dummy addresses can be used for various purposes such as do not reply addresses as well as for less salubrious reasons

Attached is a help file listing most of the likely error messages if the settings are incorrect and the causes for each

===========================================================
I have this program sometimes ago, but failed to send email through it, even though I entered correct info in their respective fields
 

isladogs

MVP / VIP
Local time
Today, 20:43
Joined
Jan 14, 2017
Messages
18,258
Please try it again and tell me what error you get.

Or email me using the link below enclosing your email settings and I'll try and email you back using your settings with that app.
 

Gasman

Enthusiastic Amateur
Local time
Today, 20:43
Joined
Sep 21, 2011
Messages
14,472
Please try it again and tell me what error you get.

Or email me using the link below enclosing your email settings and I'll try and email you back using your settings with that app.

Colin,
I've just downloaded the db from your link, but it does not match your picture?
Mine is the version with no Outlook otrion?
 

isladogs

MVP / VIP
Local time
Today, 20:43
Joined
Jan 14, 2017
Messages
18,258
Correct.
The screenshot is from one of my apps where I give users the choice whether or not to email using Outlook.
The email tester in that link is purely for setting up email using CDO
 

Gasman

Enthusiastic Amateur
Local time
Today, 20:43
Joined
Sep 21, 2011
Messages
14,472
Well I can confirm it works fine for me when I put in all the correct information. :)
 

isladogs

MVP / VIP
Local time
Today, 20:43
Joined
Jan 14, 2017
Messages
18,258
I've used it to setup email with numerous clients over the last 15 years.
The only times it has failed are when the user enters what they wrongly believe to be the correct settings.

Of course the OP might just the exception to this but I would be surprised if that were so.
 

Users who are viewing this thread

Top Bottom