Showing posts with label accepted. Show all posts
Showing posts with label accepted. Show all posts

Thursday, March 8, 2012

an email is sent when the database is updated..any help?

in the database, there is some information about the applicant: his name, his email, his status (accepted or rejected)...etc.

the page that is shown to the administrator displays the applicant name and his status, when he changes any of the applicants status, an email is sent to that applicant.

is there any way to do that?

thanks in advance

Hi,

Well you can do this like when the administrator changes the status you send the email right after changing the status. For Example:

private void UpdateApplicantStatus ()
{
//Code to update the applicant status
if (StatusUpdation == true)
{
this.EmailApplicant();
}

}

private void EmailApplicant()
{
//Code to send email to the applicant
}

Hope it will help you out,

Thanks and best regards,

|||

thanks but still didn't get it :( how can the email being sent to the adresses that are stored in the DB?

|||

Hi,

Are you able to update the the status of the user in the database. If so then I am sure you update the status according to some UserID.

If you can get the userid of the user then you can get its email address by providing the user id. In the code which I have written above you only need to add one additional thing is to write a method somthing like this

private string GetUserEmail (string UserID)
{
//Your code to get the email address from the database
return emailAddress;
}

I hope now you can have an idea of how to do this.

Thanks and best regards,

|||

If you still have some doubts then write paste your code here which you are using to update the status of the user.

Thanks and best regards,