.NET winform application. email function is pointed to the SMTP server of Linux. But it showns "Pick

B

Benny Ng

Dear All,
Now I just finished my winform application. And a part of that is to
send email reminder to the users. It's working fine in the server that with
SMTP service in Windows 2003.

But now the user wants to used the Linux server to send email messages.
(already installed the SMTP service in that). Unfortunatelly one error shown
after the sending funciton invoked.

It shows "Pickup directory is not existed,x,x,x,,"

It's well known that in SMTP service of windows system. There are
several folders in the C:\Inetpub\MailRoot, "Picker,BadMail,Queue,etc.".
When one email message is created. It would first to into "Pickup" folder.
And then changes to "Queue" folder. And then sent out.

But seems Linux system didn't has those folder or the architecture is
not same as windows system. So it prompts errors.

Should I goto change the email function and didn't use the CDO object to
send emails? Change to used Jmail to send messages? Is this a solution for
me?

Let me describe this one again.

CDO + Email Function + SMTP Service (Windows 2003) <--Successed
CDO + Email Function + SMTP Service (Linux System) <--Failed

The program is still runs on the Windows 2003 system. Only changed SMTP
Server's content that in the configuration file to Linux System.
(mail.abc.com)

So, Can you give me any suggestion about this issue?


Best Regards,

Benny Ng
 
B

Benny Ng

Dear All,

The following is the source code snippet. Please review it.

using CDO;
using Message = CDO.Message;

Message oMsg = new Message();

oMsg.From = SendEmailAddress;
oMsg.To = userEmail;
oMsg.Subject = "Prospect Reminder";
oMsg.HTMLBody = EmailContent.ToString();
oMsg.TextBody = EmailContent.ToString();

oFields["http://schemas.microsoft.com/cdo/configuration/sendusing"].Value
= 1;
oFields["http://schemas.microsoft.com/cdo/configuration/sendemailaddress"].Value
= SendEmailAddress; //sender mail
oFields["http://schemas.microsoft.com/cdo/configuration/smtpaccountname"].Value
= SendAccountName; //email account
oFields["http://schemas.microsoft.com/cdo/configuration/sendusername"].Value
= SendUserName;
oFields["http://schemas.microsoft.com/cdo/configuration/sendpassword"].Value
= SendPassWord;
oFields["http://schemas.microsoft.com/cdo/configuration/smtpauthenticate"].Value
= SendAuthentication;
//value=0 Anonymous
//value=1 Basic£¨basic (clear-text) authentication.
//The configuration sendusername/sendpassword or
postusername/postpassword fields are used to specify credentials.£©

//Value=2 NTLM£¨Secure Password Authentication in Microsoft Outlook
Express£©
oFields["http://schemas.microsoft.com/cdo/configuration/languagecode"].Value
= 0x0804;
oFields["http://schemas.microsoft.com/cdo/configuration/smtpserver"].Value
= SmtpServer;

oFields.Update();

oMsg.Send();
oMsg = null;





Best Regards,

Benny Ng
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,994
Messages
2,570,223
Members
46,810
Latest member
Kassie0918

Latest Threads

Top