Email not being sent from Console application after deploying it on Linux server

I have created a console application, through which i send email. When i run it locally email is sent properly.
But when it is deployed on Linux server email is not sent.
What should be done to send email from application when deployed on Linux server?

Show some code.
You need to make a loop calling DoEvents and wait till you get MailSent event fired.

[quote=352940:@devyani gaikwad]I have created a console application, through which i send email. When i run it locally email is sent properly.
But when it is deployed on Linux server email is not sent.
What should be done to send email from application when deployed on Linux server?[/quote]
First, is it crashing? You’ll have to check the system logs to find out. Depending on the flavor it’ll probably be /var/log/messages or /var/log/kern.

If not, make sure the firewall on the server is configured properly for the ports you are using.

@Christian Schmitz I have done the looping, the mail is sent properly when executed locally
But this problem is only occurring when deployed on Linux server.

Application did not crash. It is still running. It went into the loop which we wrote for sending email.

I assume you’ve checked the obvious first?

If you are sending via a mail server and not directly does your linux server have access to your mail server?

If its going via a mail server you own, do you see connections attempts on the mail server?

And did you check your firewall?

I checked firewall, it showed no active rules.

Try using telnet to connect to your mail server. For example telnet smtp.gmail.com smtp will connect on port 25 and give a welcome message, Telnet smtp.gmail.com 465 will connect but of course telnet is not encrypted so no welcome. If telnet times out then you can’t connect from that machine for some reason i.e. firewall, router firewall etc. This will at least eliminate your app or confirm the issue.

You can always try using MBS CURL Plugin to send email.
There you would get a debug message log showing details.

Then I suggest implementing the error events of the SMPTSecureSocket and see if there’s a specific error occurring.

I tried implementing error events of SMPTSecureSocket, and I’ve got error 102, that means connection lost, right?
How do i maintain connection?

Thank you all for your help