Changing the Send-from Address in E-Mail (1 Viewer)

RogerCooper

Registered User.
Local time
Today, 02:29
Joined
Jul 30, 2014
Messages
277
I would like to be able send e-mails from my computer which show as being send from a different address. For example, I would send invoices from the address of accounts.receivable@mycompany.com.

What be the easiest way of doing this?
 

sxschech

Registered User.
Local time
Today, 02:29
Joined
Mar 2, 2010
Messages
791
Best way, find out if you can be granted permission to that address as a shared account. Otherwise it is possible, I did it at my previous job a few years ago, had to use another program and some batch files. I can try and locate the program name and batch file code if the first option doesn't pan out, but the shared account would be preferable to the code method I provide as it might be considered as "spoofing" the email address.
 

RogerCooper

Registered User.
Local time
Today, 02:29
Joined
Jul 30, 2014
Messages
277
I definitely can get permission for that e-mail account. But how do I change the reply to for some e-mails but not others?
 

Frothingslosh

Premier Pale Stale Ale
Local time
Today, 05:29
Joined
Oct 17, 2012
Messages
3,276
You can do it with VBA as long as you have SendAs rights to the designated mailbox or distribution group by using MailItem.SendOnBehalfOf. (The rights mean that this property triggers Outlook Exchange to send it FROM that account, not just to spoof the email address.)

If you have more than one account accessed through your login in Outlook, then you can use MailItem.SendUsingAccount to mail it out directly.

Both of these will require you to use VBA to automate Outlook via Access.
 

The_Doc_Man

Immoderate Moderator
Staff member
Local time
Today, 04:29
Joined
Feb 28, 2001
Messages
26,996
I'm in agreement with the others. If you are building a message and you need it to be from Outlook, you need to have an account that you can use that has the desired return address.

If you don't need Outlook and DO have access to an SMTP portal, you COULD use MS Collaborative Data Objects (CDO) to create a message, for which your account is the .From property but there is a .SentFrom property that could name another sender. If Outlook is in ANY WAY involved, CDO is not your solution.
 

Frothingslosh

Premier Pale Stale Ale
Local time
Today, 05:29
Joined
Oct 17, 2012
Messages
3,276
For what it's worth, I have a class I wrote as a proof-of-concept (ie, practice) that SHOULD be able to do this. It's based on much less involved email code that I wrote for an application, but was meant to be a plug-and-play general purpose emailer.

I never did get around to testing the final version, though, so while the emailer engine itself should work, I can't 100% guarantee that there are no bone-headed bugs in the support procedures.
 

sxschech

Registered User.
Local time
Today, 02:29
Joined
Mar 2, 2010
Messages
791
Regarding
how do I change the reply to for some e-mails but not others?
you would need to set up your criteria perhaps with if statements, a distribution table or other logic to determine that recipientA gets from senderX and recipientB gets from senderY. You mentioned about invoices, so if the criteria is if this is an invoice use senderX and if not an invoice use senderY, then that simplifies the logic.
 

Users who are viewing this thread

Top Bottom