Emailing from Access (1 Viewer)

PhilC

New member
Local time
Today, 15:09
Joined
Nov 6, 2019
Messages
24
I have used MS Access for many years to send emails using the SendObject method without any fuss.

Now I have added a second account to my email browser (Mozilla Thunderbird). I want ro be able to specify the account to send messages in a new Db I am designing. Unfortunately I don't think SendObject can do that.

Is it possible? I have been looking for some ideas but haven't come across anything. All help gratefully received. Thanks in anticipation
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 23:09
Joined
May 7, 2009
Messages
19,175
I want ro be able to specify the account to send messages in a new Db I am designing. Unfortunately I don't think SendObject can do that.
create a form to specify which contact email to use, then you can normally use SendObject.
the problem might be with your code. the email is "hard-coded".
 

PhilC

New member
Local time
Today, 15:09
Joined
Nov 6, 2019
Messages
24
Thanks for the input. I think I may need to make my problem clearer. I use Thunderbird for all my email traffic. But I have now got two email accounts. The old one, which I have used for all of my emails is phil@beaconsfieldcottage.co.uk. But I have recently set up another account called admin@qsvcrib.c.uk. I will be using this new account solely for sending emails to a specific number of folk in the new database I am constructing. I may have got this wrong but when I code the message on the form, or in a module, surely I need to specify the new account? Otherwise the recipient may think the email has been sent by the first account. Which I am trying to avoid.

Hope that helps.
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 23:09
Joined
May 7, 2009
Messages
19,175
you can use Outlook to send using different email:
Code:
' vba - Send from another email address in Outlook - Stack Overflow
Sub New_Mail()
Dim oApp As Outlook.Application
Dim objMsg As MailItem
set oApp = New Outlook.Application
Set objMsg = Application.CreateItem(olMailItem)


With objMsg
  .SentOnBehalfOfName = " admin@qsvcrib.c.uk"
  .Display
End With

Set objMsg = Nothing
End Sub
 

Gasman

Enthusiastic Amateur
Local time
Today, 15:09
Joined
Sep 21, 2011
Messages
14,055
Well I used to use SendUsingAccount, but then I was using Outlook?
No idea as to whether Thunderbird can do that.

CDO would likely be your best bet in that case? Or ask Mozilla?
 

isladogs

MVP / VIP
Local time
Today, 15:09
Joined
Jan 14, 2017
Messages
18,186
@PhilC
Just to clarify... if you use CDO all emails are sent direct from Access. No other email application is used at all
CDO will allow you to specify the Send account.

Also, if those are those real email addresses in post #5, I suggest you remove them!
 
Last edited:

Uncle Gizmo

Nifty Access Guy
Staff member
Local time
Today, 15:09
Joined
Jul 9, 2003
Messages
16,245
I posted about CDO on my website here:-


It's about 10 years old, so take that in to account!
 

Users who are viewing this thread

Top Bottom