Problem with SMTP OCX (when sending to hotmail)

I’ve been using the SMTP OCX http://www.nowecor.de/users/stephan/Navision/smtpocx.htm It’s working fine but I came across this problem. If I send the e-mail to a colleague of mine someone@at-mycompany.com then the person receive the e-mail (We are running Microsoft Exchange) However if I send the e-mail to my-address@hotmail.com then I do not receive it (my-address@hotmail.com is a valid e-mail address) I got the same problem when using the MAPI OCX (Codeunit 397), in the “Sent Items” folder of MS Oulook I can see my “test” e-mail for my-address@hotmail.com For Info : if I MANUALLY send an e-mail to my-address@hotmail.com I receive it with in less than 2 minutes. Is there any set up I should check at the Exchange Server level ?

Hi Tarek Did you receive an error message (from Hotmail)? I’m sure you have checked the syntax of the email - address you use in the code. Did you [;)]? What happens if you resend the message from the ‘Sent Box’? bye André

Hello Andre, - If I manually re-send the mail from the “Sent Items” folder I still do not receive it - I have not receive any errors from Hotmail - When using SMTP OCX here’s the test code I did use : [b] SendMail(FromAddressPAR : Text[100];ToAddressPAR : Text[100];CCPAR : Text[100];SubjetPAR : Text[100];AttachmentPAR : Text[150])[b] SmtpMailX.NewMessage (FromAddressPAR, SubjetPAR); SmtpMailX.SetWorkMode(); SmtpMailX.SetHost (‘exchangesrv’); SmtpMailX.SetUserID (‘tarekd’); SmtpMailX.AddLine(‘Hello World’); SmtpMailX.AddAttachment (AttachmentPAR); SmtpMailX.SetToAdress (ToAddressPAR); SmtpMailX.AddCCRecipients (CCPAR); SmtpMailX.Send; IF NOT SmtpMailX.WasSuccessful THEN MESSAGE(SmtpMailX.LastError); With the snippet bellow I can manage to send an e-mail to someone at my company but not at my hotmail account [xx(]

quote:


Originally posted by Andre DDB
Hi Tarek Did you receive an error message (from Hotmail)? I’m sure you have checked the syntax of the email - address you use in the code. Did you [;)]? What happens if you resend the message from the ‘Sent Box’? bye André


Tarek… as you said the e-mail server you’re using is exchange server… that usually requieres the user to be authenticated when sending e-mail to external addresses. Try using outlook express instead of outlook and you’ll see ( i know because i was having a lot of trouble with outlook express an the exchange server on the company… at least before i touched it…). Usually exchange is not allowing relaying messages to external e-mail addresses excepting to the users connected thru microsoft outlook (and the ones using outlook express are not…) You’ve so setup the server so it allows relay of messages to all users connected or change the e-mail server you’re using. (as test try with a different e-mail server). Regards,

@Alfonso: Tarek said only this email - address doesn’t work with both mail -ocx[;)]. As far as I understand another (internet) email address worked. And- with normal send by Outlook it worked also. @Tarek: If your ‘Resend’ from within Outlook work without an error message and you didn’t receive this email on your hotmail account I must ask you again: Is the ‘To’ address from your code OK? bye André

@Andre: Tarek said:

quote:


With the snippet bellow I can manage to send an e-mail to someone at my company but not at my hotmail account


. For me that means that he can send to his company internal e-mail addreses… And it doesn’t hurt testing it also… I’m sure he checked at least twice the e-mail address before posting on the forum… and as i told on my previous post it’s something common if not having exchange properly setup for allowing relay to external addresses getting no errors and having it working fine when using outlook but not being able of relaying when using other smtp programs (like outlook express or the OCX). Regards,

quote:


Originally posted by apertierra
… I’m sure he checked at least twice the e-mail address before posting on the forum… and as i told on my previous post it’s something common if not having exchange properly setup for allowing relay to external addresses getting no errors and having it working fine when using outlook but not being able of relaying when using other smtp programs (like outlook express or the OCX). …


But the (IMHO) strange thing is: Tarek said (as far as I understand): 1. normal send by Outlook to this address works 2. send by OCX (MAPI & the other) doesn’t work 3. send an email to this address (created by MAPI -OCX) from within Outlook (‘Sent’ box) doesn’t work What is the difference between 1. and 3.? Both mails were sent by Outlook. That is the reason why I thought it could be the writing of the address (in the code). [?] bye André

Note to use SMTP OCX: in your code is: SmtpMailX.SetHost (‘exchangesrv’); but are you shure, that your ‘exchangesrv’ ís configured to work like SMTP server? It is very usual to configure the exchange server to forward all outgoing nessages to next SMTP server (each provider has usualy one or more) and that server is responsible to distribute the mail. So check in outlook expres what is the name of the outgoing server and you should send the mail to that server.

Suggestion: try to send a message with the same configuration but using the application ‘SendMailExample.exe’ which you can find into the ZIP with the vbSendMail.dll. I think you should receive an error like ‘relay not allowed’ from the exchange server. Many SMTP servers don’t allow relaying to external addresses if the user credentials are not ‘good’ (i.e. the same domain). I could fix this using an external SMTP server with userid and password. The best way to test the configuration is ‘SendMailExample.exe’.

Hi Andrea, I think that you might be right, Where can I download ‘SendMailExample.exe’ that you are refering to in your post ? Ciao, Tarek

Latest news : I can now send to a HOTMAIL.COM address using a Linux SMTP box but not through Microsoft Exchange Server [:(!] So my code is OK - There must be something wrong with our Microsoft Exchange setup but I don’t know anything about Microsoft Exchange setup I guess I will have to dig in one of those FAT book or on the MSDN …

Ok… Tarek… let me explain to you what’s the problem… as i told you on my previous post i was having a similar problem with outlook express and exchange… :slight_smile: Check on the configuration, connections and on routing you’ve to set to re-route incoming smtp mail (required for POP3/IMAPI4 connections). In exchange 2000 i think it was an option for adding also connectors… but i don’t remember exactly right now. Hope it helps you :). Regards,