Sending email with attachment using Sendobject & Thunderbird client

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ACB64
    New Member
    • Oct 2021
    • 16

    #16
    Hi Gaz,
    Yes, I’m with you- not sure where to go. But I will contact the tech help for thunderbird and see what, if anything, they may be able to help me with.
    A very big thank you to you!
    Regards,
    Andrew.

    Comment

    • NeoPa
      Recognized Expert Moderator MVP
      • Oct 2006
      • 32633

      #17
      At this stage I'd consider complete removal of Thunderbird first, followed by a valid Restart of the system and then installing Thunderbird again from scratch.

      After the first reboot following the removal of Thunderbird you may want to check the Registry for any references to it as you really want as clean a registry as possible.

      As always with the Registry, be aware that missteps are very serious and can permanently damage your system. Also bear in mind that technical support providers may decide that any such meddling can invalidate their responsibility to help. IE. Only meddle in the Registry if you decide you want to. Generally speaking it shouldn't be necessary. I do myself, from time to time, but then I'm a natural meddler ;-)

      Comment

      • ACB64
        New Member
        • Oct 2021
        • 16

        #18
        Hi NeoPa,
        Great minds think alike😊. I did that this morning, removing TB and every mention of TB from the registry that I could find. I then reinstalled TB 32 Bit.
        Same problem 😔. Needless to say, I’m feeling a little hopeless.
        Any other ideas?
        Andrew.

        Comment

        • isladogs
          Recognized Expert Moderator Contributor
          • Jul 2007
          • 479

          #19
          If you want to try something different, consider sending email direct from Access using CDO (Collaborative Data Objects)
          For more info and an example app, see my CDO EMail Tester
          Using that approach, no external email application is required. In fact, none need to be installed!

          Comment

          • ACB64
            New Member
            • Oct 2021
            • 16

            #20
            Hi Isladogs,
            If I can’t find a solution, I’ll try this work around. There are advantages to using the Send object method such as saving a copy of all sent emails, business letterhead capability etc.
            Thanks for the idea.

            Comment

            • isladogs
              Recognized Expert Moderator Contributor
              • Jul 2007
              • 479

              #21
              I've used CDO as my main email approach for over 15 years. It works seamlessly. I certainly wouldn't think of it as a 'work-round'.
              I first used it when I couldn't get Novell Groupwise to work with Access.

              CDO can do anything that the other approaches can do and , in many ways, is a lot simpler.
              You can use any valid email address, use encryption, add attachments, plain test or HTML etc.
              As for the two specific points you mentioned
              1. If you send an HTML message, you can include a business related image as a header, footer or both...or as an attachment. See the example HTML message supplied with the app. Of course, many of the email programs used by your recipients will routinely block inline images whichever method you use to send emails
              2. You can set it up to send a copy of the email to yourself.

              The only thing CDO cannot do is receive email direct in Access. You need automation for that

              Comment

              • ACB64
                New Member
                • Oct 2021
                • 16

                #22
                Dear Isladogs,
                Thanks for this. I’ll certainly look at it when I return in a couple of days. Oh, and I’ll have a detailed look at the link that you sent. I really appreciate the help and different approach.

                Comment

                • GazMathias
                  Recognized Expert New Member
                  • Oct 2008
                  • 228

                  #23
                  We used CDO a while back but TLS over 587 became a deal breaker. We ended up COM wrapping System.Net.Mail .MailMessage instead since we used it in .Net anyway.

                  Now everything seems to be going the o365 route we either have to talk to Outlook or send out though the o365 Exchange direct on 587 smtp.office365. com, but the Mail Flow settings have to have the IP definded as a send connector.

                  Email continuity is a big factor and seems to go hand in hand with GDPR shenanigans, and potential client tender questionnaires.

                  You'd be surprised at how many times the need to have users see the message in their Outlook drafts and send it themselves is a requirement for new projects, too.

                  To Andrew - could you temporarily install another mail client and test? I'm going to install Thunderbird on one of my dev VMs to see if I can replicate the problem - I'm itching to run a trace. EDIT - no luck, it worked.

                  I should've asked earlier, have you done the usual sfc:scannow and DISM.exe /Online /Cleanup-image /Restorehealth (CMD as admin).

                  Gaz

                  Comment

                  • isladogs
                    Recognized Expert Moderator Contributor
                    • Jul 2007
                    • 479

                    #24
                    Don't see why TLS was a 'deal-breaker' for you.

                    There needn't an issue using CDO with TLS over port 587.
                    I handle that very easily with the following code in my example app:
                    Code:
                       
                        'code for STARTTLS
                        If txtPort = 587 Then
                            .Item("http://schemas.microsoft.com/cdo/configuration/sendtls").Value = True
                        End If
                    It can also handle the additional security required to send messages using a GMail account. See the help file supplied with the app.

                    Comment

                    • GazMathias
                      Recognized Expert New Member
                      • Oct 2008
                      • 228

                      #25
                      From memory the issue was with TLS 1.2 via On-Premesis Exchange 2010. We no longer maintain any systems that need to send email via COM objects now.

                      Comment

                      • isladogs
                        Recognized Expert Moderator Contributor
                        • Jul 2007
                        • 479

                        #26
                        All I can tell you is that CDO does work with TLS with that code line added.
                        As stated I've used it for many years with no issues. Its used with all my commercial apps and several thousand users across a number of clients.

                        At one time, it appeared GMail was going to be a problem, but that was also solved relatively easily

                        Comment

                        • ACB64
                          New Member
                          • Oct 2021
                          • 16

                          #27
                          Wow, Gaz! A lot of that went straight over my head🤔.
                          Anyway, actually, no, I haven’t run those commands, but I will when I return tomorrow (?).
                          I’ll let you know. Thanks.
                          Andrew.

                          Comment

                          • GazMathias
                            Recognized Expert New Member
                            • Oct 2008
                            • 228

                            #28
                            Hi,

                            I ran a trace on my VM anyway to work out what's going in the call stack. Here's the interesting parts:

                            MAPI32.DLL (C:\WINDOWS\SYS TEM32\MAPI32.DL L) v1.0.2536.0 @ MAPISendMail
                            MAPI32.DLL (C:\WINDOWS\SYS TEM32\MAPI32.DL L) v1.0.2536.0 @ FGetComponentPa th
                            RegQueryValue HKCU\SOFTWARE\C lients\Mail\(De fault) -> REG_SZ Mozilla Thunderbird

                            bizarrely:

                            RegQueryValue HKLM\SOFTWARE\M icrosoft\Office \ClickToRun\REG ISTRY\MACHINE\S oftware\Clients \Mail(Default) -> REG_SZ Microsoft Outlook
                            RegQueryValue HKCU\SOFTWARE\C lients\Mail\(De fault) -> REG_SZ 40 Mozilla Thunderbird

                            Interesting class resolution parts:

                            RegQueryValue HKCR\CLSID\{29F 458BE-8866-11D5-A3DD-00B0D0F3BAA7}\( Default) -> REG_SZ "C:\Program Files\Mozilla Thunderbird\thu nderbird.exe" /MAPIStartup
                            RegQueryValue HKCR\CLSID\{29F 458BE-8866-11D5-A3DD-00B0D0F3BAA7}\P rodID -> REG_SZ MozillaMapi.1

                            Theres a lot of cross referencing to copies of the same Keys in HKLM\SOFTWARE\M icrosoft\Office \ClickToRun\Reg istry\, which makes me think that the version of MAPI32.dll that I have was installed with Office.

                            Instantiation:

                            MAPI32.DLL C:\WINDOWS\SYST EM32\MAPI32.DLL v1.0.2536.0 @ fn MAPILogoff
                            Process Start C:\Program Files\Mozilla Thunderbird\thu nderbird.exe" /MAPIStartup -Embedding
                            Load Image C:\Program Files\Mozilla Thunderbird\thu nderbird.exe
                            mozMapi32_InUse .dll C:\Program Files\Mozilla Thunderbird\moz Mapi32_InUse.dl l v0.8 @ fn MAPISendMail
                            mozMapi32_InUse .dll C:\Program Files\Mozilla Thunderbird\moz Mapi32_InUse.dl l v0.8 @ fn Ordinal0

                            Andrew - I appreciate that this may not be something you can replicate to compare with but maybe you know someone personally familiar with these techniques?

                            Process Monitor is free from the sysinternals website along with a lot of other very useful tools and can accomplish the same thing.

                            Isla - I do not doubt it. If I ever need to use CDO again I will bear it in mind. All I can say is that it did not work at the time for the very specific server it was supposed to (that replaced a Windows Server 2003 machine) so the decision was made to not spend more time trying to get it to work and to write a DLL seemed to be the simplest work around. That solution was retired in 2016 and so with it went our need for CDO entirely.

                            I'm most definitely not bashing CDO or its use within Access.

                            Gaz
                            Last edited by GazMathias; Oct 28 '21, 08:02 PM. Reason: Typos

                            Comment

                            • ACB64
                              New Member
                              • Oct 2021
                              • 16

                              #29
                              Gaz,
                              True, it’s beyond me. But, if I’m hearing you correctly, it might be because you have Outlook installed?? Do you think that I should reinstahl the entire Office 2007 program, including Outlook? I don’t want to use it, though.
                              Andrew.

                              Comment

                              • GazMathias
                                Recognized Expert New Member
                                • Oct 2008
                                • 228

                                #30
                                Hi Andrew,

                                No. My setup is different to yours - pretty sure 2007 didn't have ClickToRun.

                                What I showed here is how calling the black box that is SendObject gets to Thunderbird in my config, but there should be common steps in yours.

                                If I had to resolve such a problem personally I could verify that the resolution is happening by comparing a known bad stack trace either to a known good one on another computer or on another user profile on the same computer.

                                MAPI32.dll lives in C:\Windows\Syst em32 so the system file integrity checks I wrote about earlier should examine that dll.

                                Run command prompt as administrator (important). - Click Start, Type CMD, right click the Command Prompt entry and click Run as Administrator.

                                Type sfc:scannow and hit enter.

                                Allow it to run and correct anything it finds.

                                Regardless of what it does, type DISM.exe /Online /Cleanup-image /Restorehealth and hit enter.

                                I feel it would be best to uninstall Thunderbird and Office then restart and do the above. Then install Office, restart, install Thunderbird and restart.

                                That said, I have seen instances of reinstalling Office not correcting bad registry entries though but it is worth a try.

                                Did you pose the question to Thunderbird support - they may have tools at their disposal that will help them.

                                Gaz

                                Comment

                                Working...