• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 277
  • Last Modified:

E-mail

Hi, im currently writing a prog that requires you to e-mail something. I would like to know the code to:

A) Load the deafult E-mail editor so they can type straight off
B)Be able to put a certain ad. in the to ad.  box
C)Be able to put somewhere in the text, the contents of another txt box i have

This is quite a bigg project, although its not rocket science, i will give fair points for it!
0
beauvoir2
Asked:
beauvoir2
1 Solution
 
RanaHossainCommented:
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

use the following line to run the e-mail client.

    ShellExecute 0&, vbNullString, _
           "mailto:" & "Rana Hossain <rana.hossain@ranainside.com>" & _
            "?subject=" & "Reporting errors" & _
            "&from=" & "XXX <xxx@xxx.com>" & _
            "&body=" & _
            RepText.Text & vbCrLf & vbCrLf & _
                    "Error details follows:" & vbCrLf & vbCrLf & _
                    "-------------------------------------------------------" & vbCrLf & vbCrLf & _
                    errorLog & vbCrLf, _
            vbNullString, "C:\", vbNormal

0
 
beauvoir2Author Commented:
That doesnt seem 2 work..... do i need anything else?
0
 
RanaHossainCommented:
hmm... can't think of anything... do a test by saving an Email from the Email client (as EML file)
double click to see if you can open it..
0
 
CleanupPingCommented:
beauvoir2:
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
Experts: Post your closing recommendations!  Who deserves points here?
0
 
DanRollinsCommented:
beauvoir2, an EE Moderator will delete this for you.
Moderator, my recommended disposition is:

    DELETE this question (refund points).

DanRollins -- EE database cleanup volunteer
0

Featured Post

Receive 1:1 tech help

Solve your biggest tech problems alongside global tech experts with 1:1 help.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now