Problem in sending Mails.

rashish12

New member
Joined
Jan 3, 2008
Messages
2
Programming Experience
3-5
I used System.net namespace to send mail thru my smtp server using all the required credentials like username,pwd,hostname etc.

It works smoothly on my machine. but when i setup my application on another system then it does not work.

Can anybody tell me what cud be the problem?
If any details required plz let me know.

Thanks in advance.
 
make sure the smtp exists and that the port is opened for traffic. you can try to telnet to the smtp server from the deployment machine by using the command window:

c:\>telnet your.smtpserver.com 25

if you can't connect then the port is either closed or it can't find the server.
 
"does not work" ? If you used same Smtp server on other machine it may not have access to it, Smtp servers may block calls sent from IP other than from within the ISPs range.
 
Thanks giadich n JohnH for your reply.

I got the problem.
Actually, McAfee was blocking the port 25 for security reasons.
When I either disable the McAfee or add my application exe name in the exclusion list of the 'Access Protection' of McAfee I got my code working.

Now my problem is that on each computer it is not possible to make McAfee (antivirus) off or follow the 2nd solution as my application will be set up on no. of client computers. Its not feasible in case of n nos. of computers for n clients as each client would not be following this solution.
So, is there any programming alternative for this prob?
I want any help on this issue now.

Thanks in Advance.
 
So, is there any programming alternative for this prob?
There isn't. Firewall must open for the required internet traffic. Most FW give user notification about blocking with option to open. Only direct user interaction can control this, else this protection would be pointless. Depending on the FW user may allow Tcp/Udp traffic in/out for certain ports or applications.
 
if this is on a corporate network you might be able to ask the network admin to configure Mcaffee to allow traffic on port 25 and the policy would apply to all the clients on the network so you won't have to deal with it on a per machine basis.
 
Back
Top