Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeDNN Open Source...DNN Open Source...Provider and Extension ForumsProvider and Extension ForumsAuthenticationAuthenticationUse a test email address for the current sessionUse a test email address for the current session
Previous
 
Next
New Post
5/1/2008 2:45 PM
 

Hi - I want to test authentication setups in DNN and would like to override all sending of email so that I get the emails rather than the email address of the registered user. Is this easy? What would I need to look at to make sure I could use a test email override on a per session basis? Other testers would want their email to be used of course, so this isn't a web.config thing. - Neil

 
New Post
5/1/2008 7:55 PM
 

I don't think this will be exactly easy ... there are a couple of paths you could take.  Just brainstorming ...

ASP programming: maybe modify the core email engine to override all TO addresses with yours? 

I'm not slick enough to try that, so how about an IT approach?  I might try something along the lines of setting up an email server on the local test server that accepts any email address and routes them all to one mailbox and point your host email server there.  I

Or a DBA solution, write a stored procedure to set all the email addresses to your address?  Put a trigger on the users table to run it?

I've been removing the email server from the test system to prevent annoying people at our site, but I understand you need those emails to go out!  All of these are personal solutions, it wouldn't help the other testers, unfortunately.

Let us know if you come up with anything, it's an interesting question!

--
Roberta

 
New Post
5/23/2008 3:42 AM
 

Thanks for the brainstorm. I am working on this and it is now getting critical so I hope to have an approach in the next week.

The need as I see it is to set this up for a browser session so as not to affect any other users of the site. I think this needs to be available on the live system also for future testing by the client when they change email forms etc. A secondary need would be to make sure that as a tester I don't forget to flick the switch - whatever that turns out to be - to divert emails:-)

My favourite approach would be that I could create an role Tester - or designate Admin as a permanent testing role - and set up a session scoped cookie to override all outging emails with the tester's address. This would mean logging in as a Tester role member, or adding oneself to the Tester role,  first before switching to other accounts. This means some changes to the core email module though, which, although fairly easy, means a customized install:-(

Anyone, please comment on this approach or other ideas?

 
New Post
5/27/2008 12:13 PM
 

I have decided - with trepidation -  to modify the Mail.vb component to change the mailTo variable to an address stored in a cookie. The cookie gets set in an HttpModule whenever a member of the Administrators (or a new one - Testers) role logs in. The cookie hangs around for a day. It seems to work fine.

Neil

 
Previous
 
Next
HomeHomeDNN Open Source...DNN Open Source...Provider and Extension ForumsProvider and Extension ForumsAuthenticationAuthenticationUse a test email address for the current sessionUse a test email address for the current session


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out