Hello everyone. Can Anyone give me direction how to build send mail cros exchange server in delphi.

Hello everyone. Can Anyone give me direction how to build send mail cros exchange server in delphi. 
I am using indy smtp for regular smtp ports, but now one of my client need to send email to their employment(with some data from my program for each of them) with their exchange server. I told them easy way w/o waiting is to open some account on gmail or outlook and to countinue to use form from my program with SMTP but their IT admins not allowing that. Almost 2 day looking for some example but I didnt found enything what can work.
Anyone can help?

Comments

  1. Maybe they allow to connect with IMAP directly to the exchange server.
    Secend method would be remote control outlook with mapi.
    Third method would be use libopenchange http://openchange.org/

    ReplyDelete
  2. Maybe I am not understanding you.  Are you saying that SMTP is not working on Exchange or you can't get attachments to work?  Exchange supports SMTP.

    ReplyDelete
  3. SMTP port not working on exchange server, need to login on I am not sure what port 443 or something like that, and to send mail to employments. I dont have attachment just each mail for them with some personal data. I found http://www.emailarchitect.net/easendmail/ but thats active x control, I wonder is there anything any component for delphi?

    ReplyDelete
  4. My Exchange server SMTP is on port 25.  If my Delphi app runs on the same LAN as the server, then I don't need an SMTP username or password.  I use Delphi/Indy to send thousands of emails via our company Exchange server.  No, it is not spam :-)

    Does your app run on the same LAN as Exchange?  There are limitations for sending via SMTP/Exchange if your app is not on the same LAN.

    The best way to send attachments is to NOT send attachments.  I put files on our web server and link to them in the email body. That cuts way down on bandwidth, and the message recipient can decide if they really want to see the attachment. Also, I can count the number of hits on the web file and see if people are actually reading the file.

    I wrote an HTML macro expansion unit that reads in a HTML template file containing macro tags. It fills in fields and then sends the HTML to a list of email recipients.  Maybe you don't need attachments - I fill in HTML tables for that kind of information in my emails.

    ReplyDelete
  5. SMTP and POP3 turned off on that exchange server. And I think only 443 or 433 not sure which one work(not counting active directory and etc.) . And I dont think that on same lan is that exchange server, its under domain in another country.

    ReplyDelete
  6. You will need to have the IT Manager of the Exchange server set up a rule to all you to "relay" email then.  Exchange (and any other modern Email server) does not allow you to use it to send to addresses outside a server's LAN, if the message originates from outside the LAN.  This prevents spammers from hijacking your email server and using it to send spam.  You can set up Exchange to allow relaying from a single, external IP address though.  This is easy to do - we had to do it on our Exchange server for some external offices of our company.

    ReplyDelete
  7. Also, the IT Manager will have to open their firewall to allow you to send SMTP messages through the proper port.  They can use NAT/Port Forwarding if they like, but you may have to adjust your software to use the correct port.

    ReplyDelete
  8. heś saying the IT disallows SMTP, so why you wont use any other option?

    ReplyDelete
  9. If they won't allow SMTP, then Drazen Djurisic will have to use some other server - or convince them that SMTP is not a big security risk.  With proper relay settings and SSL or TLS encryption, SMTP can be made secure and spammer-proof.

    ReplyDelete
  10. That was first what did I ask them and they said it is not their politics in company. I probably didnt explain clearly. Company what use my software is big like coca-cola or bigger, they have their rules in company and dont want anyone to change that. They asking my company to follow their rules. I sent email to their IT admins to send me some info for exchange server and thats all what I can.

    indy SMTP allowing me to connect to some SMTP server, as I said this company doesnt have SMPT. I can find active x where I can enter server name(exchange), username, password, SSL and thats all what I need to send email. But sad things that I cant find anything for delphi what was make in delphi VCL. Anyway guys ty for help, I will search for some solution.

    ReplyDelete
  11. IMAP sound very good, need just to read litle about that. If I understand good for imap/imap4 u need to open port on exchange server, need to wait for respond from theit IT admins, does they have open that ports IMAP - port 143, Secure IMAP (IMAP4-SSL) - port 585, IMAP4 over SSL (IMAPS) - port 993. One thing is probably for sure thats https port 443 or exchange active sync. Looking for something like that, becose user for actyve sync port need only to enter exchange server adress, username, password and to check SSL. Probably SSL for active sync is on every exchange server.

    ReplyDelete

Post a Comment