Pre-requisites for email program
-
Hi, I have developed an email program to send emails to users at end of the daily based on the data I have in database. I want to schedule this program in a PC. When I did a test run from that PC I could not get mails from my program. But it is working fine on another computer. Could anyone let me know what are the system requirements for my email program to work correctly. To my uunderstanding we should have SMTP server. How to install/configure SMTP server on the PC. my email code is as follows Dim iMsg As New CDO.Message Const cdoSendUsingPort = 2 ' Apply the settings to the message. With iMsg .To = Recipient .From = Sender .Subject = Subject ' "This is a test CDOSYS message (Sent via Port 25)" .HTMLBody = strHTML .Send End With Regards, Uma
-
Hi, I have developed an email program to send emails to users at end of the daily based on the data I have in database. I want to schedule this program in a PC. When I did a test run from that PC I could not get mails from my program. But it is working fine on another computer. Could anyone let me know what are the system requirements for my email program to work correctly. To my uunderstanding we should have SMTP server. How to install/configure SMTP server on the PC. my email code is as follows Dim iMsg As New CDO.Message Const cdoSendUsingPort = 2 ' Apply the settings to the message. With iMsg .To = Recipient .From = Sender .Subject = Subject ' "This is a test CDOSYS message (Sent via Port 25)" .HTMLBody = strHTML .Send End With Regards, Uma
That depends on the user account your app is running under. For example, if you're using Exchange, you need to setup an Exchange account for the user account that your app is running under.
A guide to posting questions on CodeProject[^]
Dave Kreskowiak -
Hi, I have developed an email program to send emails to users at end of the daily based on the data I have in database. I want to schedule this program in a PC. When I did a test run from that PC I could not get mails from my program. But it is working fine on another computer. Could anyone let me know what are the system requirements for my email program to work correctly. To my uunderstanding we should have SMTP server. How to install/configure SMTP server on the PC. my email code is as follows Dim iMsg As New CDO.Message Const cdoSendUsingPort = 2 ' Apply the settings to the message. With iMsg .To = Recipient .From = Sender .Subject = Subject ' "This is a test CDOSYS message (Sent via Port 25)" .HTMLBody = strHTML .Send End With Regards, Uma
It's not usual to find the answer within the question:
Uma Kameswari wrote:
.Subject = Subject ' "This is a test CDOSYS message (Sent via Port 25)"
So, prerrequisite for this code: port 25 must be opened. But port 25 is not usually opened. Some ISP's close it to avoid spam so I guess you should try another port, and maybe SSL, to make sure your emals will be sent. There are several articles here at Code Project that might help you. Search "SMTPClient" and have a look.
-
That depends on the user account your app is running under. For example, if you're using Exchange, you need to setup an Exchange account for the user account that your app is running under.
A guide to posting questions on CodeProject[^]
Dave KreskowiakWe are using exchange server. thank you for your response. Regards, Uma