944,100 Members | Top Members by Rank

Ad:
  • ASP.NET Discussion Thread
  • Unsolved
  • Views: 4309
  • ASP.NET RSS
Aug 2nd, 2006
0

Email send in ASP.NET with "Accept en Deny" link

Expand Post »
Hello,


- I’ve made an form where users can subscribe.
- When they click on the submit button then they will receive an email with their data they have filled in on the form.
- There will be also an email send to an administrator with the same data as the user received BUT with 2 extra “links” (Accepten Deny)
- When the admin clicks on the “Accept” link then it will be forwarded to the “Approval.aspx” page

Now is the question:

Is it possible to have the data that in the email is, publish on the page (approval.aspx) to?
I’ve put the following in my code:


//Send mail to User
string mail = "";
mail += "Full Name: " + TxtLastname.Text + "\t"+ TxtFirstname.Text + "\n";
mail += "Street: " + TxtStreet.Text + "\n";
mail += "Zip: " + TxtZip.Text + "\n";
mail += "City: " + TxtCity.Text + "\n";
mail += "Phone: " + TxtPhone.Text + "\n";
mail += "Email: " + TxtEmail.Text + "\n";

MailMessage Mailer = new MailMessage();
Mailer.From = TxtEmail.Text;
Mailer.To = "unie.test@example.be";
Mailer.Subject = "Ask for a password.";
Mailer.Body = mail + "\n" + "Note: You will receive a notification email, when you're accept by the administrator then you will receive a Username and a Password.";
SmtpMail.SmtpServer = "";
try
{
SmtpMail.Send(Mailer);
}
catch (Exception ex)
{
lblMessage.Text = "<b>Exception Occured:</b> " + ex;
}
finally
{
lblMessage.Text = "Your E-mail has been sent sucessfully";
}

//Send mail to Administrator
string message = "";
strEmail = TxtEmail.Text;
message += "Full Name: " + TxtLastname.Text + "&nbsp;&nbsp" + TxtFirstname.Text + "<br>";
message += "Street: " + TxtStreet.Text + "<br>";
message += "Zip: " + TxtZip.Text + "<br>";
message += "City: " + TxtCity.Text + "<br>";
message += "Phone: " + TxtPhone.Text + "<br>";
message += "Email: " + TxtEmail.Text + "<br>";

MailMessage Mail = new MailMessage();
Mail.From = TxtEmail.Text;
Mail.To = "unie.test@example.be";
Mail.Subject = "Ask for a password.";
Mail.BodyFormat = MailFormat.Html;
Mail.Body = message + "<br>" + "<a href='http://www.example.be/01/Approval_BE_NL.aspx?approval=accept'>Accept</a>" + "&nbsp;&nbsp;&nbsp" + "<a href='http://www.example.be/01/Approval_BE_NL.aspx?approval=deny'>Deny</a>";
SmtpMail.SmtpServer = "";
try
{
SmtpMail.Send(Mail);
}
catch (Exception ex)
{
lblMessage.Text = "<b>Exception Occured:</b> " + ex;
}
finally
{
lblMessage.Text = "Your E-mail has been sent sucessfully";
}


The reason why I need the info of the user in the Approval.aspx page, is to put the user his/her info into the database.

Is this possible and if yes, Is it possible to help me to do how?

Great thanks,
Unie
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
unie is offline Offline
1 posts
since Aug 2006
Aug 8th, 2006
0

Re: Email send in ASP.NET with "Accept en Deny" link

you can do it like this.
  1. read email using streamreader,capture information and pass to next page.
Reputation Points: 10
Solved Threads: 0
Light Poster
aish is offline Offline
26 posts
since Aug 2005

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in ASP.NET Forum Timeline: from DB
Next Thread in ASP.NET Forum Timeline: FREE DotNetNuke File Manager, FREE ASP.NET POP3 and more





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC