First time (I think) I have had to send multiple attachments in an email. Works with 1 file try 2 files get messages that file cant be found. Tried to decipher the meaning of the POS_POSITIONS$ field to see if it is related to multi files, but don't understand it. Running 9.2.1 - I am assuming not beta bug.
Is the following correct:
Message='
Message=Subject
Message=Email
Message=TxtBodys
Message=IPM."
Message=Doc1 test.PDF":@vm:"Doc2 test.PDF"
Message=C:\EMAILPDF\Doc1 test.PDF":@vm:"C:\EMAILPDF\Doc2 test.PDF"
Message=( len( message) - 2 )
if MAPISendMail(0, 0, Flags, Message) then
Check out and consider the S/SMTP offer from Sprezzatura, http://www.sprezzatura.com, see the Announcements for links and documentation.
Dave
Thanks Dave - hopefully one of those cases where what is delivered is not worth what you pay for it given it's free :).
World leaders in all things RevSoft
It is not shown on your site anymore, also, the other utils that are shown have no 'more' links.
When I go to their site, on the right is an Announcements section which reads:
15th October 2010
We're pleased to announce the release of version 1.2.1 of S/SMTP, our freeware SMTP client for OpenInsight, which you can find here. This version fixes a bug when connecting to a mail server over SSL.
More details on S/SMTP can be found in this blog post.
If I click on the "here" it offers to download a .zip file.
Dave
Ahhh, that was sneaky, thanks
Can anyone tell me if the following is correct:
Message='
Message=Subject
Message=Email
Message=TxtBodys
Message=IPM."
Message=Doc1 test.PDF":@vm:"Doc2 test.PDF"
Message=C:\EMAILPDF\Doc1 test.PDF":@vm:"C:\EMAILPDF\Doc2 test.PDF"
Message=( len( message) - 2 )
What about Message , whare the help says it is @vm delimited - is that related to @vm file list.
Here is what I am testing with..this code returns error mapi 11 attachment not found. If the lines:
FullFileNames=C:\EMAILOUTS\JobQuoteDetails809A.PDF"
FullFileNames=C:\EMAILOUTS\JobQuoteDetails809.PDF"
are commented out, email is sent.
*
function test_mapisendmail(Void)
*
*Returns 1 if error
*
declare subroutine Msg, Get_Status
declare function MapiSendMail, MAPILogon, MAPILogoff, Unassigned, Dialog_Box$insert Mapi_Equatesequ CRLF$ to \0D0A\equ CR$ to \0D\equ LF$ to \0A\equ TAB$ to \09\equ null$ To ''
Session="* Flags=MAPI_LOGON_UI$
* x=Set_Status(0)
* check=MAPILogon(session, @window,
,
, flags)* if Get_Status(ErrCode) then
* Call FsMsg()
* end
[email protected]"FullFileNames=null$FullFileNames=C:\EMAILOUTS\JobQuoteDetails809B.PDF"FullFileNames=C:\EMAILOUTS\JobQuoteDetails809A.PDF"FullFileNames=C:\EMAILOUTS\JobQuoteDetails809.PDF"FileNames=null$cnt=Count(FullFileNames,@vm) + (FullFileNamesnull$)For x=1 To cntFileNames=FullFileNames-1,'B\'Next xTxtBody=This is one line"Company=TESTING COMPANY"Subject=TESTING SUBJECT"Message='Message=SubjectMessage=EmailMessage=TxtBodyMessage='Content_Type= "IPM."Message=Content_TypeMessage=FileNamesMessage=FullFileNamesMessage=( len( message) - 2 )RetVal=0x=Set_Status(0)if MAPISendMail('','','', Message) thenMsg(@window, "Email to ":Company:" sent successfully!":@fm:"T1")end elseGet_Status(ErrMsg)Msg(@window, "Email to ":Company:"!":ErrMsg)RetVal=1endReturn RetVal
***
Is anyone able to give me an answer on this. I have sprezz util working, now user needs a return receipt.
Can you or cant you sent multiple attachments using MAPISendmail.
Barry,
If you're using our SMTP library you should have the source to one of the smtp_Sendxxxx functions:
smtp_SendText smtp_SendHTMLIf you look in there you'll see a message being built using smtp_Set_Property to set the MSG property…
e.g.
... objxArray := @rm : smtpID propArray := @rm : "MSG.FROM" dataArray := @rm : sender if len( replyTo ) then objxArray := @rm : smtpID propArray := @rm : "MSG.REPLYTO" dataArray := @rm : replyTo end objxArray := @rm : smtpID propArray := @rm : "MSG.TO" dataArray := @rm : toList ... call smtp_Set_Property( objxArray, propArray, dataArray )All you need to do is:
Take a copy of the function Rename it to something like BS_SMTP_SendHTML() Add an extra argument to pass in the receipt-to address Add an extra statement to set the MSG.RECEIPTTO property like so:... objxArray := @rm : smtpID propArray := @rm : "MSG.FROM" dataArray := @rm : sender if len( replyTo ) then objxArray := @rm : smtpID propArray := @rm : "MSG.REPLYTO" dataArray := @rm : replyTo end objxArray := @rm : smtpID propArray := @rm : "MSG.TO" dataArray := @rm : toList * // Request a read-receipt - set the MSG.RECEIPTTO * // property to the address the receipt should be * // sent to ... * // * // e.g [email protected]" objxArray := @rm : smtpID propArray := @rm : "MSG.RECEIPTTO" dataArray := @rm : receiptTo ... call smtp_Set_Property( objxArray, propArray, dataArray )Battlestar Sprezzatura - BSG 77
Colonial leaders in all things RevSoft
Barry,
To answer your other question you should be able to send multiple files via MAPI. Can't say we've used this in a long time but here's a snippet of code from one of our MAPI email programs that worked:
... * // NOTE: dataArray contains the MAPI message to send * // And set the position at the end of the message noOfAttachments = count( emailAttachments, @vm ) + 1 for x = 1 to noOfAttachments emailMessage := " " dataArray<POS_POSITIONS$,x> = len( emailMessage ) - 1 * // Make sure the path is fully qualified dataArray<POS_PATHS$,x> = zzx_Utility( "RESOLVEPATH", dataArray<POS_PATHS$,x>, "" ) next dataArray<POS_TEXT$> = emailMessage * // Note the path to any attachments MUST be fully qualified - * // it cannot be relative!!!! ...Battlestar Sprezzatura - BSG 77
Colonial leaders in all things RevSoft
]]dataArray=len( emailMessage ) - 1
Thank you, I thought that was the culprit…thank you ever so much.
Wow that looks fun, I shall definitely try that and implement.
Cool, works….I just used the sender.