PDA

View Full Version : got problem in code to mail an attachment




sachin.singh
Nov 5, 2008, 02:47 AM
hello...:)

I am developing an iphone application in which i am sending an mail attachment via SMTP CLIENT using BSD SOCKETS...

I hav succeeded with the same but i am getting a mail which contains a decoded text in mail body...:(:(

I HAVE STUCK IN THIS FROM LAST 4-5 DAYS....PLZ HELP ME OUT SOON....:(:(

THE MAIL WHICH I GOT IS:


MIME-Version: 1.0
Content-type: multipart/mixed; boundary="#BOUNDARY#"


--#BOUNDARY#
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: quoted-printable

The CSMTPConnection classes allows

you to send SMTP messages from MFC code

--#BOUNDARY#
Content-Type: application/octet-stream; name=rose.jpg
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename=rose.jpg

AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAA

--#BOUNDARY#--


I HAVE USED THE CODE FROM D BELOW LINK:

http://www.codeproject.com/KB/IP/csmtpconn.aspx#Enhancements


PLZ PLZ HELP ME FOR THE SAME WITH SOME SAMPLE CODE OR NE OTHR ALTERNATIVE...
THANKIN IN ADVANCE....
SACHIN.....:apple: