sending emails using C++.Net

  • Thread starter Thread starter lizii
  • Start date Start date
L

lizii

Hey there - hopefully last newbie question i will ask for a while!


I want my application to work where you click a button - and it either:
a) open a email application - insert the correct email address and add
a subject + any attachments
or
b) just create an email and send it off with appropriate attachments
etc.


However i have a snag - i have no idea what their smtp server will be
(and the chances are, neither will they!)

i found out about mailMessage and the SmtpMail - however to send the
email i need to know the smtp.

Is there anyway of finding out from their machine what their Smtp
details are? or anyway of opening up their default mail service and
slotting in these details? I found brief glimpses about using Shell -
but not too sure about whats going on there. Better yet would be some
book or some website that gives a bit more clear idea about all of
this.

Thanks in advance!
 
You can use Simple MAPI to do this. This will use whatever Email client the
user has configured and will use it to actually send the message.
 
lizii said:
Hey there - hopefully last newbie question i will ask for a while!


I want my application to work where you click a button - and it either:
a) open a email application - insert the correct email address and add
a subject + any attachments
or
b) just create an email and send it off with appropriate attachments
etc.

Can anyone say "abusable for spam"?
 
Thats a good point actually - i never thought of it that way.

We are actually using it within my company for a Fault and incident
report - plus to be used by our customers. So obviously i don't want
them to have the hassle of opening up the client - selecting the
correct information and cutting and pasting...then the attachments and
adding them.

If i can however just open them up an email client with the relevent
information attached and all they have to do is click "send" then that
would be fine. Also avoids people sending us hundreds of emails for
one problem as they are "unsure" if it was sent.

Thanks for that Ben actually - it changes my approach to the whole
thing and it will be better just to use there email client and get them
to send it - rather than me firing off an email automatically and havoc
breaking loose!

Lizii.
 
Back
Top