![]() |
Anybody good wih VB code?
Anybody here good with VB code?
One of my customers is trying to send out some mailshot using MS Access with intergrates with Outlook to send the email. They don't want the email to be from internalemployeename@company.co.uk but to use enquiries@company.co.uk. The code I have been given is like this: Quote:
Thanks for the advice! :tu: |
Re: Anybody good wih VB code?
hmm i am sure you can set a .From in the Oulook object...
left my program days a while back so am not 100% Edit: I know it sounds crazy but before Quote:
Quote:
EDIT: I suck :( ;) |
Re: Anybody good wih VB code?
Nah you can't do that with from. you have to use .SentOnBehalfOfName
|
Re: Anybody good wih VB code?
So write it like this:
.Subject = Forms!frmMail!strSubject .From = enquiries@company.co.uk ...with the .From entry directly under the .Subject?? Correct? ---------- Post added at 15:36 ---------- Previous post was at 15:34 ---------- Quote:
My coding skills are krap!! Thanks Lee |
Re: Anybody good wih VB code?
Quote:
|
Re: Anybody good wih VB code?
.SentOnBehalfOfName = "enquires@company.com"
|
Re: Anybody good wih VB code?
So make you bit above say:
Quote:
|
Re: Anybody good wih VB code?
Yep pretty much.
Are you using exchange? If you have any problems you might need to check the permissions on the mailbox to let you send mail on behalf of others. IIRC. |
Re: Anybody good wih VB code?
Wicked - thanks!
I'll pass it onto the customer and see what happens.... Will let you know tomorrow morning... ---------- Post added at 15:51 ---------- Previous post was at 15:42 ---------- Quote:
|
Re: Anybody good wih VB code?
Yep, gazzae is spot-on. :tu: For security reasons (to stop people spoofing from addresses ...although it can be done anyway, just not in VB) you have to use .SentOnBehalfOfName()
More info, and some snippets of code here - http://support.microsoft.com/?kbid=232309 |
| All times are GMT. The time now is 11:23. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
All Posts and Content are © Cable Forum