Sending E-Mails from Another Account (1 Viewer)

RogerCooper

Registered User.
Local time
Today, 02:56
Joined
Jul 30, 2014
Messages
286
I want send invoices to customers from my computer, but have the sender be an accounts receivable e-mail, not my e-mail address.

I am using the Outlook Automation Object in VBA. How can I change the send from account? Everything else I can do, even set the reply to.
 

The_Doc_Man

Immoderate Moderator
Staff member
Local time
Today, 04:56
Joined
Feb 28, 2001
Messages
27,179
The MailItem properties you need to see are enumerated here:

https://msdn.microsoft.com/en-us/library/office/dn320330.aspx

According to this reference, Sender is a Read/Write field and you can also (if you wish) use the SendUsingAccount (which I believe requires permission of the account owner). You can do several other things to fill in the fields of the Mail Item before you send it.

Look in the properties reference list started with "Sender" and you will see all sorts of things that might help you spiffy up your mail sending procedures.
 

Minty

AWF VIP
Local time
Today, 10:56
Joined
Jul 26, 2013
Messages
10,371
Depending on the account settings you may be able to use SendOnBehalfOf property.

It sometimes can be very fussy if the person doesn't have the account actually linked to their local outlook, we wanted to send invoices from accounts@ but the users concerned only had sending privilege, not the mailbox account actually linked to their Outlook pst, and we couldn't get it to work.
 

isladogs

MVP / VIP
Local time
Today, 10:56
Joined
Jan 14, 2017
Messages
18,219
If you use CDO for sending email, you can specify any valid email address as the sender.
Of course, as already stated, you should have permission to do so.

This has many valid uses e.g. no reply email addresses though of course it can also be used for nefarious purposes.

Have a look at my email tester utility which will allow you to check settings and then send email using a specified sender from Access
https://www.access-programmers.co.uk/forums/showthread.php?t=293368
 

Users who are viewing this thread

Top Bottom