Results 1 to 8 of 8
  1. #1
    GraeagleBill's Avatar
    GraeagleBill is offline Experienced Old Geezer
    Windows 10 Access 2013 32bit
    Join Date
    Feb 2011
    Posts
    1,919

    Sending emails from Access VBA

    From one of Paul's old posts https://www.devhut.net/vba-outlook-automation/, Daniel Pineault offers a clean method of sending emails via Outlook. The problem, or at least where I'm currently bumping my head, is that gmail isn't allowing Outlook to access its servers. I thought I could circumvent that issue with the gmail 2-step verification available at Google, but don't see it at Google for Outlook.

    Any ideas for an alternative? I only need to periodically "Send" emails with attachments.



    EDIT:
    I found this, but imposing this kind of scenario upon a user doesn't seem like a reasonable request.
    https://blog.gsmart.in/2-step-verifi...gmail-outlook/

  2. #2
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    4,940
    You now use the authentication password that google gives you, when you select that option. Do not lose it either.

    Then there is outlook.com?
    Please use # icon on toolbar when posting code snippets.
    Cross Posting: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?sear...bug+access+vba

  3. #3
    isladogs's Avatar
    isladogs is offline MVP / VIP
    Windows 10 Office 365
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    5,977
    As I think I've mentioned to you before you can send email from Access without involving an external app such as Outlook
    See my example app: CDO EMail Tester (isladogs.co.uk)
    CDO does still work with GMail by using the set app password feature mentioned above
    Colin, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I don't know, I keep quiet!
    If I don't know that I don't know, I don't know whether to answer

  4. #4
    GraeagleBill's Avatar
    GraeagleBill is offline Experienced Old Geezer
    Windows 10 Access 2013 32bit
    Join Date
    Feb 2011
    Posts
    1,919
    Thanks Colin, I'll chime back in a couple of hours.


    EDIT: I owe you an apology Colin. You "taught" me some time ago about CDO and I completely forgot. I even ran your test module at that time and recall how simple it was. My only excuse is that this fuzzy old brain of mine continues to be troublesome, as evidenced by this OP.

  5. #5
    GraeagleBill's Avatar
    GraeagleBill is offline Experienced Old Geezer
    Windows 10 Access 2013 32bit
    Join Date
    Feb 2011
    Posts
    1,919
    CDO does still work with GMail by using the set app password feature mentioned above
    I can't find the option that Welshgasman mentions.

  6. #6
    isladogs's Avatar
    isladogs is offline MVP / VIP
    Windows 10 Office 365
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    5,977
    See the help file that is supplied with my example app. It includes info on how to apply an app password. Its not done within Access itself.
    Colin, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I don't know, I keep quiet!
    If I don't know that I don't know, I don't know whether to answer

  7. #7
    GraeagleBill's Avatar
    GraeagleBill is offline Experienced Old Geezer
    Windows 10 Access 2013 32bit
    Join Date
    Feb 2011
    Posts
    1,919
    Thanks Colin, the biggest help is found here: https://support.google.com/accounts/answer/185833

  8. #8
    isladogs's Avatar
    isladogs is offline MVP / VIP
    Windows 10 Office 365
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    5,977
    Correct. That tells you all you need to do to keep CDO working with GMail's new security measures
    Colin, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I don't know, I keep quiet!
    If I don't know that I don't know, I don't know whether to answer

Please reply to this thread with any new information or opinions.

Similar Threads

  1. sending emails using VBA
    By StuartR in forum Access
    Replies: 4
    Last Post: 02-19-2018, 04:56 AM
  2. Sending Outlook Emails from form in Access 2007
    By IncidentalProgrammer in forum Programming
    Replies: 4
    Last Post: 01-09-2015, 11:06 AM
  3. Sending Emails from Access via Outlook
    By Terry Lawson in forum Programming
    Replies: 3
    Last Post: 11-14-2014, 10:03 AM
  4. Generating and sending emails through Access
    By crowegreg in forum Programming
    Replies: 9
    Last Post: 06-10-2013, 08:35 AM
  5. Replies: 1
    Last Post: 11-14-2012, 01:43 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums