Solved

How to send an e-mail with attachment without mapi and cdonts

Posted on 2004-08-03
10
212 Views
Last Modified: 2013-11-20
Hi,
   I have to send a mail with attachment from my application. I think i can not use mapi since it's not neccessary whether user is using outlook or not. If I use cdonts , in that case iis server should be installed on that machine.

  In summary if there is a net on pc what is the best way to send an email with attachment without any assumption.


 
0
Comment
Question by:NavinKaushik
  • 3
  • 3
10 Comments
 
LVL 16

Expert Comment

by:nonubik
ID: 11705157
> In summary if there is a net on pc what is the best way to send an email with attachment without any assumption.

Find out the SMTP server address, and send raw MIME data
0
 
LVL 55

Accepted Solution

by:
Jaime Olivares earned 200 total points
ID: 11705201
Hi NavinKaushik,
You have to use "Simple MAPI"
Look official information at MSDN, starting at:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/mapi/html/_mapi1book_about_simple_mapi.asp

Look examples at codeproject.com:
http://www.codeproject.com/internet/


Good luck,
Jaime.
0
 

Author Comment

by:NavinKaushik
ID: 11705765
nonubik Could you tell me what is the api to get the smtp address. And if I get the smtp address then will i have to use cdonts ????

Jaime , is it neccessay that outlook should be configured by the user to use mapi and  it will open as well ????
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 55

Expert Comment

by:Jaime Olivares
ID: 11705856
You need a configured account in outlook (or outlook express) in order to send and receive mail with Simple MAPI.
0
 

Author Comment

by:NavinKaushik
ID: 11706059
hmmm, If I send mails using that account, will it show all mails sent by application in sent items ????

Second thing , you did't tell me , is it neccessay that when my application will send email at that particular time should out working ???

0
 
LVL 55

Expert Comment

by:Jaime Olivares
ID: 11706278
>If I send mails using that account, will it show all mails sent by application in sent items ????
Yes
> is it neccessay that when my application will send email at that particular time should out working ???
calling Simple MAPI functions correctly will lauch Outlook automatically.
0
 

Author Comment

by:NavinKaushik
ID: 11712376
Hi ,
    I have got a solution on codeguru forum. I would like to let you know Since in this case there is no dependency on outook, that's what I was looking for. I don't want to take any assumption like outlook will be configured etc.

 Attachments need to be sent by encoding the message in MIME format.
Additionally you might take a look at the following
 "http://codeproject.com/internet/csmtpconn.asp".
It wraps the SMTP protocol including the mentioned MIME attachments...
__________________
Ciao, Andreas
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Windows Drag & Drop Location 2 94
Expand LInux Boot partition remotly 3 86
Hibernate methods 2 68
child constructor and parent constructor, overriding and overloading 6 79
This is to be the first in a series of articles demonstrating the development of a complete windows based application using the MFC classes.  I’ll try to keep each article focused on one (or a couple) of the tasks that one may meet.   Introductio…
Introduction: Dialogs (2) modeless dialog and a worker thread.  Handling data shared between threads.  Recursive functions. Continuing from the tenth article about sudoku.   Last article we worked with a modal dialog to help maintain informat…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…

863 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now