Is there a possibility to run the SendEmail Activity with Lotus mail server?

Hello,

Is there a possibility to run the SendEmail Activity with Lotus mail server? if it's how would I proceed?

[127 byte] By [Maaloul] at [2007-12-23]
# 1

I assume that you're referring to the SendEmailActivity in WSS v3. If I remember correctly, it just uses whatever SMTP server you have configured in SharePoint (i.e., the same one that's used to send out alerts).

You may not be able to use your Lotus mail server directly, because SharePoint doesn't let you authenticate to the SMTP server; it needs an open SMTP server. You pretty much have two options:

  1. Set up a local SMTP service, and have it relay to your Lotus mail server.
  2. Write your own custom SendMailActivity that uses System.Net.Mail to authenticate to your Lotus mail server.
R.Muti at 2007-8-30 > top of Msdn Tech,Software Development for Windows Vista,Windows Workflow Foundation...
# 2

No I think you're referring to the Sample SendMailActivity ; indeed, relay you local smtp service to your Lotus mail Server or provide its smtp adress in the activity host property; I've just tested it right now with my internet (but not lotus) smtp server, that works.

SergeLuca at 2007-8-30 > top of Msdn Tech,Software Development for Windows Vista,Windows Workflow Foundation...
# 3
My mistake. I didn't even know that this sample existed. Does it let you pass credentials to the SMTP server? If so, then I guess the second option that I mentioned has already been done for him.
R.Muti at 2007-8-30 > top of Msdn Tech,Software Development for Windows Vista,Windows Workflow Foundation...
# 4

Actually this sample uses the System.Net.Mail.SmtpClient class; there are no credential properties on the activity sample, but we can add it : the SmtpClient class has a "Credentials" property.

Serge

SergeLuca at 2007-8-30 > top of Msdn Tech,Software Development for Windows Vista,Windows Workflow Foundation...
# 5
OK, so it doesn't expose the Credentials property, so it would still need to be modified.
R.Muti at 2007-8-30 > top of Msdn Tech,Software Development for Windows Vista,Windows Workflow Foundation...
# 6

yes very easy : one additional string property for the password (it can be encrypted if you want), and in SendEmailUsingSmtp() , add the following lines :

NetworkCredential myCredentials = new NetworkCredential(<your email>,<your password>);
client.Credentials = myCredentials;
// if necessary: client.EnableSsl=true;
client.Send(message);

SergeLuca at 2007-8-30 > top of Msdn Tech,Software Development for Windows Vista,Windows Workflow Foundation...

Software Development for Windows Vista

Site Classified