Hello ,We are using the WORDMAILMERGE to send a word document to clients. The problem is the we are able to send the document to only one email address at a time properly . If we try to send the same document again to another email address (after it is sent to the first) , it sends the mail twice to the second email address. Below is the code for your reference .
/***some code******/
/* Open the DataSource and link it to the Active Document */
hLink:MailMerge:OpenDataSource(fData) NO-ERROR.
if error-status:error THEN do:
fStat = "E Could not open Data Source " + fData + " " + fLink + ".".
leave main.
end.
hLink:MailMerge:Destination = fDest NO-ERROR. /* Set merged output destination */
if error-status:error THEN do:
fStat = "E Could not open New Destination " + string(fDest) + ".".
leave main.
end.
if fMergex begins "E" then do:
hLink:MailMerge:Destination = 2. /* wdsendtoemail */
hLink:MailMerge:MailSubject = fTitlex.
hLink:MailMerge:MailAddressFieldName = "xmerge".
end.
hLink:MailMerge:Execute() no-error. /* Execute the merge */
if fMergex begins "E" then do:
hLink:MailMerge:Destination = 2. /* wdsendtoemail */
hLink:MailMerge:MailSubject = fTitlex.
hLink:MailMerge:MailAddressFieldName = "xmerge1".
end.
hLink:MailMerge:Execute() no-error. /* Execute the merge */
In the code above the first " hLink:MailMerge:MailAddressFieldName = "xmerge". " sends one mail to the first reciepent , which is fine . But the second "hLink:MailMerge:MailAddressFieldName = "xmerge1"." send two mail to the receipent with respect to "xmerge1".
Please suggest , any help is appreciated . Thanks .
Your question may be more specific to the WORDMAILMERGE utility rather than the ABL used to drive this functionality and therefore you may also want to consider posting your question to WORDMAILMERGE forums as well.
Evan Bleicher
Your question may be more specific to the WORDMAILMERGE utility rather than the ABL used to drive this functionality and therefore you may also want to consider posting your question to WORDMAILMERGE forums as well.
Evan Bleicher
Thanks Evan .. the issue is resolved . It was other setting in my application due to which it was sending two mails. Appreciate your help and Time .
you could also try the free docxfactory project and smtpmail.p
it would be alot more powerful, faster and you could run it on unix/linux.