Batch MAPISendMail (OpenInsight Specific)
At 09 JUL 2001 12:11:05AM Jim Weir wrote:
I've been trying unsuccessfully to get a batch email process to execute using MAPISendMail with MS Outlook running in Win98. With a modem connection established and Outlook running, the process passes the email data to Outlook's outbox but does not attempt to send it. Furthermore, the 'from' address in the message structure () does not get passed to Outlook.
Others on this discussion form claimed to have developed such a process. But for me, even using their code sampling doesn't work. could it be an Outlook setting I don't know about? What puzzles me,is how anyone could get this running if MAPI can't pass the source email address to Outlook in structure.
I'll be grateful for any help.
At 09 JUL 2001 03:19AM [url=http://www.sprezzatura.com]The Sprezzatura Group[/url] wrote:
Could we see the code you've been using?
World Leaders in all things RevSoft
At 09 JUL 2001 09:20AM Dave Harmacek wrote:
I, too, have found that Outlook ignores the FROM entry.
At 09 JUL 2001 09:25AM [url=http://www.sprezzatura.com" onMouseOver=window.status=Click here to visit our web site?';return(true)]The Sprezzatura Group[/url] wrote:
Is you mail client configured to give you the right to send as the "From" you are using?
World Leaders in all things RevSoft
At 09 JUL 2001 02:03PM Jim Weir wrote:
It makes sense that this could be the problem. I've been fishing around in Outlook to find where I would set a "From" address as default or as authorization of the contents of message but can't find it. Any hints?
This is the code I've been using. I lifted it from a posting from Frank Tomeo of SRP. Frank claims it works for him, so the solution is probably the mail client setting as you suggested.
Thanks for your help.
subroutine mapiTest(dummy)
declare function MapiSendMail, MapiLogon, MapiLogoff
declare subroutine msg, get_status
$insert Mapi_Equates
message="
message="
message=MAPI Test"
message=This is MAPI test"
message=IPM."
sessionId='
logonOk=MapiLogon(sessionId,@window,"MS Exchange Settings","")
if logonOk then
if MapiSendMail(sessionId,@window,0,message) thenmsg(@window,"message sent successfully!")end elseget_status(errMsg)msg(@window,errMsg)endx=MapiLogoff(sessionId)end else
msg(@window,"Logon Failure")end
return
At 09 JUL 2001 02:23PM [url=http://www.sprezzatura.com" onMouseOver=window.status=Click here to visit our web site?';return(true)]The Sprezzatura Group[/url] wrote:
Do you have a Mail applet in your control panel? Who does it say you are? Are you sending as that person?
World Leaders in all things RevSoft
At 09 JUL 2001 11:25PM Jim Weir wrote:
I finally got it running thanks to your help. It seems that what Outlook does is it puts the email records in the outbox and then polls the outbox at a specified frequency sending them out at a rate of one per pass. Since the highest allowed frequency is once per minute, a batch process of even a few hundred email records would take just too long (a few hundred minutes). I guess I'll have to look for a more efficient mail client.
I wonder why MS didn't just send the emails out continuously one after another until the outbox was empty. Wouldn't that make sense?
Thanks again for your help.
At 10 JUL 2001 07:20AM [url=http://www.sprezzatura.com" onMouseOver=window.status=Click here to visit our web site?';return(true)]The Sprezzatura Group[/url] wrote:
Well our Outlook installation does not seem to have this limitation. We'd strongly suggest checking all configuration options!
World Leaders in all things RevSoft
At 10 JUL 2001 07:28AM [url=http://www.sprezzatura.com]The Sprezzatura Group[/url] wrote:
For high volume you always have SMTP as an option. Most SMTP clients require the IP/domain of the sender address to match an approved list (ie. the host in question belongs to the email originator), although spammers can usually find an open SMTP server with which to send mail, where the from: email address can be nonsense.
We have run SMTP mail clients successfully from inside AREV (A-MAIL is a tool we developed in house for this purpose), and thus there are multiple options to support sending of email from OI.
Collecting mail from a pop3 server is a similar exercise in scope and degree of complexity to sending via SMTP.
MAPI, as a Microsoft tool, tends to obscure the simplicity of SMTP and POP3 communications, which are worth entertaining as alternatives.
World Leaders in all things RevSoft