Emailing with ShellExecute API
I know the email issues is a popular one and has been ask a billion times but I have another question I have searched for an didn't find it asked.
I am wondering if using the ShellExecute API can you change who the email is from, I know most email agents set the from automatically to the user.
Basically I want to have the email be emailed from Person A however want the from clause to be Person B.
I have tried adding "&from=" into the string for the subject,body,cc, ect. But nothing has work thus far.
Re: Emailing with ShellExecute API
What email client are you shelling to?
Re: Emailing with ShellExecute API
Nope, and it wouldnt be good to do so either. I hope its not spam emails? :D
You could create an alternate account and just send them from there. ;)
Re: Emailing with ShellExecute API
Here
VB Code:
Option Explicit
Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long
Private Sub cmdMail_Click()
ShellExecute 0, vbNullString, "mailto:
[email protected]?subject=Hello!!", vbNullString, vbNullString, vbNormalFocus
End Sub
Re: Emailing with ShellExecute API
That doesnt change the "From" property as its just basic emailing with the default email client editor. ;)
Re: Emailing with ShellExecute API
Yes I know I just figured as hes askin the Q I would post that .. !
Re: Emailing with ShellExecute API
But it cant be done with the ShellExecute API at all.
Re: Emailing with ShellExecute API
Quote:
Originally Posted by RobDog888
But it cant be done with the ShellExecute API at all.
Yes i know my code just makes a link lol .
an opens Outlook
Re: Emailing with ShellExecute API
Actually, ShellExecute opens the default email client editor. ;)
Re: Emailing with ShellExecute API
Quote:
Originally Posted by RobDog888
Actually, ShellExecute opens the default email client editor. ;)
O yes ,, sorry i said taht b.c i use it lol .. O well yes it opens default