|
-
Apr 18th, 2005, 02:56 PM
#1
Thread Starter
Addicted Member
Sending email [RESOLVED]
I've done some searching but I haven't found exactly what I'm interested in. I have a program that gets diagnostic data on a remote users computer (MSInfo, Ping, Tracert, etc.) and currently holds it locally. I'd like to change it so that it can fire off a message with a few text files attached back to our tech support people for them to analyze. Example: the user is having difficulty logging on to our web app, calls tech support, they tell them to run the diagnostic app and it brings up a dialog saying that you are about to email files to so and so and they can click ok or cancel, and then it sends out the email.
My question is whether or not this is going to get fairly complex, and what kind of API stuff might it involve so I can read up on it.
Thanks
Last edited by bat711; Apr 18th, 2005 at 03:26 PM.
-
Apr 18th, 2005, 03:01 PM
#2
Re: Sending email
Here is about the easiest way. Uses the default mail client.
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 Const SW_HIDE As Long = 0
Private Const SW_SHOWNORMAL As Long = 1
Private Sub Command1_Click()
ShellExecute 0&, "OPEN", "mailto: [email protected]?subject=something&body=this is the body", vbNullString, "C:\", SW_SHOWNORMAL
' ShellExecute Me.hwnd, "open", "c:\CSP_SNMP.vbs", "router1 Public", "C:\", 1
' c:\ = Destination Folder
End Sub
-
Apr 18th, 2005, 03:18 PM
#3
Thread Starter
Addicted Member
Re: Sending email
Is there a way to do it without using an email app like Outlook? Just wondering as I'd like this to be as portable as possible.
-
Apr 18th, 2005, 03:20 PM
#4
Re: Sending email
If you dont want to use any email client then you will need access to an SMTP server and search the
forums for SMTP. It allows you to send mail without needing Outlook or similar type programs.
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 
-
Apr 18th, 2005, 03:25 PM
#5
Thread Starter
Addicted Member
Re: Sending email
Ok, thanks that sounds like what I'm looking for. I'll check out the SMTP solution.
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
|