|
-
Jul 24th, 2006, 10:48 AM
#1
Thread Starter
Fanatic Member
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.
-
Jul 24th, 2006, 01:43 PM
#2
Re: Emailing with ShellExecute API
What email client are you shelling to?
The most difficult part of developing a program is understanding the problem.
The second most difficult part is deciding how you're going to solve the problem.
Actually writing the program (translating your solution into some computer language) is the easiest part.
Please indent your code and use [HIGHLIGHT="VB"] [/HIGHLIGHT] tags around it to make it easier to read.
Please Help Us To Save Ana
-
Jul 24th, 2006, 01:45 PM
#3
Re: Emailing with ShellExecute API
Nope, and it wouldnt be good to do so either. I hope its not spam emails? 
You could create an alternate account and just send them from there.
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Jul 24th, 2006, 08:23 PM
#4
Lively Member
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
-
Jul 24th, 2006, 08:24 PM
#5
Re: Emailing with ShellExecute API
That doesnt change the "From" property as its just basic emailing with the default email client editor.
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Jul 24th, 2006, 08:37 PM
#6
Lively Member
Re: Emailing with ShellExecute API
Yes I know I just figured as hes askin the Q I would post that .. !
-
Jul 24th, 2006, 09:27 PM
#7
Re: Emailing with ShellExecute API
But it cant be done with the ShellExecute API at all.
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Jul 24th, 2006, 09:35 PM
#8
Lively Member
Re: Emailing with ShellExecute API
 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
-
Jul 24th, 2006, 09:42 PM
#9
Re: Emailing with ShellExecute API
Actually, ShellExecute opens the default email client editor.
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Jul 24th, 2006, 10:23 PM
#10
Lively Member
Re: Emailing with ShellExecute API
 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
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|