Problems with Email, cusmapi



I have created a routine to mail batches of emails. It works perfectly on all
4 of my PCs at home but fails on all 3 of a colleagues’ machine. We both use
Outlook XP (2002) and both use XP SP on our machines.

I got the information on how to use ‘cusmapi’ to email from this forum and
pasted the suggestion with modifications into my ‘program’. However, run on
my colleagues’ machine, the program not only fails but fails at the point
where it tries to tell me HOW it failed. The system is unable to use the
error message system in this line:-

“cErrTxt=cErrTxt+Chr(10)+oMail.GetErrorInfo(nI)”

…… as it doesn’t recognise the oMail.GetErrorInfo(nI) part pof the
instruction.

I can’t see what’s missing: should the oMail.GetErrorInfo() be somewhere
accessible in the code or is it inherent in the call to cusmapi? Is there a
misprint in the spelling of o.Mail.GetErrorInfo()?

Without being able to see the content of the ‘help’ message, I can’t ‘debug’
what causes the failure in the first place. As my development PC doesn’t
“fail”, I can’t use the debugger which is on that machine to see the problem!

Any suggestions?

Here is the section in which the component ‘fails’ to run:

******************************************************************

* CREATE list of email recipients
***********************************
* First create compulsory main recipient, won't work without at least ONE
"To;"

m.cRecipients=Alltrim(parafile.defemail)+";"

* Compulsory Main recipient created

Select allblock
Go Top
Scan
m.cRecipients=m.cRecipients+"BCC:"+(Alltrim(allblock.alemail))+";"
Endscan

Set Classlib To MAPIMAIL Additive
oMail=Createobject("cusmapi")
nOK=oMail.SendMail("", "", cRecipients, m.subjtext, m.mailtext,
m.cAttachments)
Do Case
Case nOK=0
* ?? Chr(7)
Wait Window Nowait Alltrim(Str(m.emailno))+ " EMails created"
Case nOK > 0
cErrTxt=""
For nI=1 To nOK
cErrTxt=cErrTxt+Chr(10)+oMail.GetErrorInfo(nI)
Endfor
Messagebox([Errors:]+cErrTxt, 64, "# of SendMail errors: "+Transform(nOK))
Case nOK < 0
Messagebox("MAPI client not available")
Endcase

Select allblock
Delete All
m.blockcount=0
Select client

.



Relevant Pages

  • Re: Exchange Weird Issue
    ... Emails are from different external users, ... involved in a conversation with the intended recipient. ... Your server is open relaying emails. ... When you enable recipient filtering on the SMTP virtual server, ...
    (microsoft.public.windows.server.sbs)
  • Re: Exchange Weird Issue
    ... Emails are from different external users, ... involved in a conversation with the intended recipient. ... So I don't think it's a spam or open relay issue... ... Your server is open relaying emails. ...
    (microsoft.public.windows.server.sbs)
  • RE: Exchange Weird Issue
    ... Are these emails from internal user or external user? ... Your server is open relaying emails. ... Configure Recipient Filtering ... When you enable recipient filtering on the SMTP virtual server, ...
    (microsoft.public.windows.server.sbs)
  • Re: Exchange Weird Issue
    ... Nope - it's only going to user b, she forwards it to the intended recipient. ... Emails are from different external users, ... Your server is open relaying emails. ... When you enable recipient filtering on the SMTP virtual server, ...
    (microsoft.public.windows.server.sbs)
  • RE: 550 Unable to Relay
    ... Do you receive emails from internet via pop3 connector or deliver directly ... Please add a recipient policy for the expected domain. ... This newsgroup only focuses on SBS technical issues. ...
    (microsoft.public.windows.server.sbs)

Quantcast