Sending email without hardcoding email server information. How?

Hello Experts,

I've found some posts on EE regarding how to send emails however all of them require to my knowledge the hardcoding of the email server information.

Basic Info:

At work, we have around 2700 workstations and each employee already has their own NT login which just happens to be part of their email address too e.g. johndoe@company.com.

I was wondering if there is a way to create and app that consists of lets say... Button1 & Text1. Whatever txt is found within this box gets sent to a hard coded email address once Button1 is pressed.

Question:

How to make the code behind this button send emails with currently logged on user's outlook profile including all email server info etc.

Thanks for any help : -)
LVL 1
donniedarko801Asked:
Who is Participating?
 
ctm5Commented:
I found a down and dirty way to do what you want:

        Dim sendto As String = MyHardCodedEmailAddress
        Dim strHeader As String = Textbox1.Text
        Dim strTarget As String = "mailto:" & sendto & "?body=" & strHeader
       
        System.Diagnostics.Process.Start(strTarget)

My app is used by all sorts of people on all sorts of systems and so far (crossyafingas) no problems.

ctm5
0
 
Bob LearnedCommented:
1) Are you asking how to send email with Outlook automation?

2) What version of Outlook are you using?

3) Does everyone have the same version?

Bob
0
 
donniedarko801Author Commented:
Outlook 2000. All of them yes.
0
Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
Bob LearnedCommented:
Are you going to send attachments?  If so, you can't use the mailto: protocol.  Also, you can only send plain text emails, and not HTML/RTF.

Bob
0
 
donniedarko801Author Commented:
just text
0
 
Bob LearnedCommented:
What did you think about using mailto:?

Bob
0
 
ctm5Commented:
We've been assuming that you can get the user's Outlook profile. Is that correct or do you need some ideas about that?

ctm5
0
 
donniedarko801Author Commented:
sorry about the delay, was on vacation
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.