buty
asked on
Mail Attchment with outlook?
Hi every body
I have used the following command to run outlook and make new message with subject and "TO"..etc.
The command is
run("rundll32 url.dll,FileProtocolHandle r " + "mailto:a@b.com&subject=He llo")
It's run very nice ,but my problem is How to add to this command attachment to attach files.Any help ,I tried but I can't.
I have used the following command to run outlook and make new message with subject and "TO"..etc.
The command is
run("rundll32 url.dll,FileProtocolHandle
It's run very nice ,but my problem is How to add to this command attachment to attach files.Any help ,I tried but I can't.
hi here is the example in power builder how to send a mail from with attachment
//example
mailSession mSes
mailReturnCode mRet
mailMessage mMsg
//
// Create a mail session
mSes = create mailSession
// Log on to the session
mRet = mSes.mailLogon()
IF mRet <> mailReturnSuccess! THEN
MessageBox("Mail", 'Logon failed.')
RETURN
END IF
// Populate the mailMessage structure
If dw_report.dataobject='dr_a rc_card' then
mMsg.Subject = "Hello How are you" //+ "
mMsg.NoteText = 'This is the body of mail ' Auto Generated E-mail by the system'
mmsg.AttachmentFile[1].Fil ename='foo t9.ico'
mmsg.AttachmentFile[1].Pat hname='c:\ '
mMsg.Recipient[1].name = 'gajender_99@hotmail.com'
mMsg.Recipient[2].name = 'gajender_99@yahoo.com'
// Send the mail
mRet = mSes.mailSend(mMsg)
IF mRet <> mailReturnSuccess! THEN
MessageBox("Mail Send", 'Mail not sent')
RETURN
END IF
mSes.mailLogoff()
DESTROY mSes
//example
mailSession mSes
mailReturnCode mRet
mailMessage mMsg
//
// Create a mail session
mSes = create mailSession
// Log on to the session
mRet = mSes.mailLogon()
IF mRet <> mailReturnSuccess! THEN
MessageBox("Mail", 'Logon failed.')
RETURN
END IF
// Populate the mailMessage structure
If dw_report.dataobject='dr_a
mMsg.Subject = "Hello How are you" //+ "
mMsg.NoteText = 'This is the body of mail ' Auto Generated E-mail by the system'
mmsg.AttachmentFile[1].Fil
mmsg.AttachmentFile[1].Pat
mMsg.Recipient[1].name = 'gajender_99@hotmail.com'
mMsg.Recipient[2].name = 'gajender_99@yahoo.com'
// Send the mail
mRet = mSes.mailSend(mMsg)
IF mRet <> mailReturnSuccess! THEN
MessageBox("Mail Send", 'Mail not sent')
RETURN
END IF
mSes.mailLogoff()
DESTROY mSes
hi just change
mMsg.NoteText = 'This is the body of mail ' Auto Generated E-mail by the system'
to mMsg.NoteText = 'This is the body of mail ~nAuto Generated E-mail by the system'
mMsg.NoteText = 'This is the body of mail ' Auto Generated E-mail by the system'
to mMsg.NoteText = 'This is the body of mail ~nAuto Generated E-mail by the system'
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Gentlemen,
Thanks for the discussion on this topic.
I used the examples but was not able to send the attachment until I included the file name in the pathname as per the powerbuilder documentation.
mmsg.AttachmentFile[1].Fil ename='foo t9.ico'
mmsg.AttachmentFile[1].Pat hname='c:\ foot9.ico'
Thanks again,
Paul
Thanks for the discussion on this topic.
I used the examples but was not able to send the attachment until I included the file name in the pathname as per the powerbuilder documentation.
mmsg.AttachmentFile[1].Fil
mmsg.AttachmentFile[1].Pat
Thanks again,
Paul
regards-