WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

MAPI

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

mSendMail Using Exchange

 Keywords:  mSendMail mSendMailex Exchange

Question:

I am attempting to use the MAPI extended to send email when I dont know the Full SMTP address, I only know the Exchange alias. I have tried using these various commands:
Error1=mSendMailEx("[SMTP:galaara]","Subject,"Body","File","")
this one tries to tack the rest of my email domain to the addresss and send it.. IE galaara@aaa.com
Error1=mSendMailEx("galaara","Subject,"Body","File","")
this one errors, bad formated email address
Error1=mSendMailEx("[EXCHANGE:galaara]","Subject,"Body","File","")
Email fails, unknown transport
Error1=mSendMailEx("[MSEMS:galaara]","Subject,"Body","File","")
Email fails, unknown transport

Does anyone know how to do this???

Answer:

Not sure I have never tried it.

A search at http:/groups.google.com suggested that the following is a valid format for Exchange:

EX:/o=SHELL/ou=MSXSEPC/cn=Recipients/cn=RL185153

EX - is for MS Exchange.  There are other types as well

cn - Basic Email name, i.e.  BobBolin

References: http://groups.google.com/groups?q=mapi+exchange+address+format+%5BEX:&hl=en&lr=&ie=UTF-8&oe=UTF-8&selm=3460C551.363E%40MSXSEPC.SHELLUS.COM&rnum=2

and

http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&oe=UTF-8&frame=right&th=1887e4e838499e22&seekm=36CD3029.91BE920%40samsung.co.kr#s

Maybe try something like:

recip_email="[EX:/O=UPDATE/OU=UPDATE_A/CN=RECIPIENTS/CN=galaara]"; change to fit your needs
Error1=mSendMailEx(recip_email,"Subject,"Body","File","")


Have you considered using the Postie Extender instead?

:sendemailtoadmin
;   add the postie extender...
addextender("WWPST32I.DLL")
;   smtp host to login to...
host="Exchange Server"            ; <--- change to your mailserver
;   fake from address...
fromaddr="Fake Address"
userid=""                        ; <--- User ID and password
password=""                        ; <---
;   port to login to...
port=""
;   email to...
tolist="Display Name here"         ; <--- display name here
cclist=""
bcclist=""
;   email subject...
subject="Test Subject"
;   email text...
msg="Testing 123"
attachments=""
flags=""
kInit(host,fromaddr,userid,password,port)
kDest(tolist,cclist,bcclist)
kSendText(subject,msg,attachments,flags)
return

Article ID:   W15409
File Created: 2017:07:28:12:58:31
Last Updated: 2003:05:13:10:27:30