SMTP Authentication

This is a forum to suggest new features for mojoPortal. 

This thread is closed to new posts. You must sign in to post in the forums.
5/7/2005 3:41:06 AM
Gravatar
Total Posts 38

SMTP Authentication

Hi,
I would like to use the 'Strict' feature of my SMTP server in prevention of any relay of mail from happening which will require the usage of SMTP Authentiction.

Would it be possible to include SMTP authentication in Mojo for email of non local mail?

User Name and password paremeters required for SMTP server

Thanks
5/7/2005 4:56:19 AM
Gravatar
Total Posts 18439

Re: SMTP Authentication

Hi David,

Are you working with the VS.NET solution?  Would you be interested in implementing this as a configurable option and sending me the changes? If not I'm sure I can get to it sometime in the not too distant future.

Also wondering if you would mind if I list your site on the showcase page?

Thanks,

Joe
5/7/2005 4:29:09 PM
Gravatar
Total Posts 38

Re: SMTP Authentication

Hi Joe, Be happy to add this to the source. I will need to find my way around the CVS process. Sure thing on the site listing. Thanks
5/8/2005 3:06:37 AM
Gravatar
Total Posts 18439

Re: SMTP Authentication

Hi David,

Thanks for the help. I think the code you will want to modify is in Email.cs in the Business project.

Actually, not using CVS but Subversion aka svn which is much better.  You'll want to get TortoiseSVN which will integrate nicely with Windows explorer so you can right click a folder and checkout.  Also there are a couple of text files you'll need to modify to allow VS.NET to treat class library projects like Web projects. There are notes/links on how to do it and why its needed on the download page.  I have found that I like svn much better than SourceSafe which I use everyday at work.

If that is too much trouble I also have a zip file download on Novell Forge. Its not up to date with the new version but I may update that later today. svn is really the way to go if you think you might want to contribute to the project over time.

Thanks,

Joe
5/8/2005 2:30:21 PM
Gravatar
Total Posts 38

Re: SMTP Authentication

Hi Joe,
I added SMTP authentication works great on my dev site:

Added to Web Config:

Modified Email.cs

int intSMTPType = System.Convert.ToInt32(ConfigurationSettings.AppSettings.Get("SMTPType"));

if (intSMTPType > 0 )
{
mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate",intSMTPType );
mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendusername",ConfigurationSettings.AppSettings.Get("SMTPUser") ); //set? username here
mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendpassword", ConfigurationSettings.AppSettings.Get("SMTPPass"));??? //set? password here
}

SmtpMail.SmtpServer = ConfigurationSettings.AppSettings.Get("SMTPServer");
SmtpMail.Send(mail);
}

There is a problem with this class that if a failure occurs the user is still added to the DB. Further registration attempts are errored as User already exists.

I would like to add the above to the DB rather than web config. Secure password etc.
For now this gets me by. Would also like to check for added parms Uer Name / Password as required fields when SMTType > 0
Downloaded the TortoiseSVN doing my home work the configuration process. I took your advice on the optional download for now until I can get svn to work with VS 2003.

Thanks
David
5/9/2005 8:56:31 AM
Gravatar
Total Posts 38

Re: SMTP Authentication

Sorry Joe,

My apologies I was speaking to my setup not the actual core  I just realized that it sounds like I'm  asking to change the core.

Sorry bout that

David...

 

5/9/2005 1:07:08 PM
Gravatar
Total Posts 18439

Re: SMTP Authentication

Hi David,

I have no problem with adding the smtp authentication to the core as long as its a configurable option so that its there if you need it but not if you don't. What you've done looks good, I'll make the changes to my version as soon as I get a chance, was too busy this past weekend with family obligations.

>There is a problem with this class that if a failure occurs the user is still added to the DB. Further registration attempts are errored as User already exists.

I'm not sure what you are saying here, the Email.cs doesn't  talk to the db. Sounds like you are talking about the registration process, if you have found a bug please post a separate thread in the Bugs forum with the steps to reproduce it.

It would be better to send me the code changes as an e-mail attachment rather tha posting them in the forums. If you do get svn working at some point, it has a nice feature to support remote collaboration, you make your code change to the checked out file and then right click it in Windows Explorer and choose TortoiseSVN>Create Patch, this produces a patch file (which is just a text file) that I can easily apply to my version to update svn

I've just posted a step by step to get you going with TortoiseSVN, it so easy, I just configured another machine tonight.

http://www.mojoportal.com/ForumThreadView.aspx?thread=101&forumid=9&pageindex=3

Thanks,

joe_audette at yahoo dotcom

You must sign in to post in the forums. This thread is closed to new posts.