| Author |
Thread |
| Email validation |
|
Posted in tutorial: Creating an ASP.NET Newsletter Application |
· beeby
Joined: 14 Oct 2009 Total Posts: 4 |
Email validation Posted: 14 Oct 2009
I've setup the newsletter system. However, when I get the email with link to validate my email and click the link it does not update the fields in the Subscribers table in the database to show the address as validated. Is there something I have missed?
|
· cristikiss88
Joined: 27 Oct 2009 Total Posts: 5 |
Re: Email validation Posted: 27 Oct 2009
Hello,
Have you ever figure out how to make that procedure work? I have the same problem like you, and i can't figure it out.Thanks.
Best!
|
· beeby
Joined: 14 Oct 2009 Total Posts: 4 |
Re: Email validation Posted: 27 Oct 2009
I haven't sorted it no. As a work around you can setup a job to update all email addresses to be validated but this of course defeats the whole point of having the validation system. Not had chance to look at the cause or got a reply from anyone.
Good that you get it too, means it is unlikely to be something I did wrong.
If I find the answer I will update this thread.
|
· cristikiss88
Joined: 27 Oct 2009 Total Posts: 5 |
Re: Email validation Posted: 27 Oct 2009
Thank you for your answer. I think that tomorrow i will have a look again on it and i hope i will figure it out. If so i will post here the fix.
Best!
|
· ameng222
Joined: 12 Nov 2009 Total Posts: 3 |
Re: Email validation Posted: 12 Nov 2009
Hi, At last I got it after trying it for hours. Just change the table name in DatabaseHelper.cs from [dbo].[IsSubscriberEmailValidated] to [dbo].[ValidateEmail] and the problem solved.
Good Luck.
########### DatabaseHelper.cs ################### ...... ...... public static int ValidateEmail(SqlConnection con, SqlTransaction trans, string email, int validationCode) { using (SqlCommand cmd = new SqlCommand("[dbo].[ValidateEmail]", con)) { cmd.CommandType = CommandType.StoredProcedure;
cmd.Parameters.Add("@email", SqlDbType.VarChar, 50).Value = email; cmd.Parameters.Add("@validationCode", SqlDbType.Int).Value = validationCode; cmd.Parameters.Add("ReturnValue", SqlDbType.Int).Direction = ParameterDirection.ReturnValue;
if (trans != null) cmd.Transaction = trans;
cmd.ExecuteNonQuery(); return Convert.ToInt32(cmd.Parameters["ReturnValue"].Value); } } ..... ..... ################################################
|
· cristikiss88
Joined: 27 Oct 2009 Total Posts: 5 |
Re: Email validation Posted: 13 Nov 2009
Thanks for your reply. I have changed the newsletter functionality to support html enabled e-mails.
Thanks anyway!
|
· beeby
Joined: 14 Oct 2009 Total Posts: 4 |
Re: Email validation Posted: 13 Nov 2009
How did you change it to work with HTML???
Thanks to the poster that suggested the fix, I will try it out.
|
· ameng222
Joined: 12 Nov 2009 Total Posts: 3 |
Re: Email validation Posted: 13 Nov 2009
Hi beeby,<br /><br /> I'm also change it to work with HTML.<br /><br /> I'm using Cute Editor for .NET and emmbed in to the code. You can see the installation guide from Cute Editor site. And to make it be able to view correctly from database just add msg.IsBodyHtml = true; in the JobRunner.cs file..<br /><br />That is what I did. Maybe others got better ideas.
|
· cristikiss88
Joined: 27 Oct 2009 Total Posts: 5 |
Re: Email validation Posted: 13 Nov 2009
If you want to use the same functionality as before make the changes that amenq222 suggested down. I have changed that functionality a little bit, because i didn't need some of it, but instead i needed something new.
|
· beeby
Joined: 14 Oct 2009 Total Posts: 4 |
Re: Email validation Posted: 13 Nov 2009
Excellent! Thank you so much
I seem to have another issue though. I create a job email and it goes into database but does not appear in the manage prepared emails section or the list of prepared emails when I add a job. Anyone else get this issue? what have I missed?
|
· ameng222
Joined: 12 Nov 2009 Total Posts: 3 |
Re: Email validation Posted: 16 Nov 2009
I'm not sure about that. But you can try this: - You have to click add job, when you finished creating the email. OR - Make sure you database is connected when you create email. OR - Make sure you already creating the database correctly (tables and stored procedure). OR - Reinstall back the application(last choice).
Just my 2 cents suggestion.
|