Exemplo n.º 1
0
        protected void btnSubmit_Click(object sender, EventArgs e)
        {
            TellYourFriend newTaf = GetFormValues();

            SendMailToFriends(newTaf);
            Response.Redirect("../Email/images/GiftCertificate.jpg");
        }
Exemplo n.º 2
0
        protected TellYourFriend GetFormValues()
        {
            TellYourFriend newTaf = new TellYourFriend();

            newTaf.UserName  = txtYourName.Text;
            newTaf.UserEmail = txtYourEmail.Text;

            newTaf.FirstFriendName  = txtFirstFriendName.Text;
            newTaf.FirstFriendEmail = txtFirstFriendEmail.Text;

            newTaf.SecondFriendName  = txtSecondFriendName.Text;
            newTaf.SecondFriendEmail = txtSecondFriendEmail.Text;

            newTaf.ThirdFriendName  = txtThirdFriendName.Text;
            newTaf.ThirdFriendEmail = txtThirdFriendEmail.Text;

            newTaf.EmailSubject = txtEmailSubject.Text;
            newTaf.EmailBody    = HTMLEditor1.Text;

            return(newTaf);
        }
Exemplo n.º 3
0
 protected void SendMailToFriends(TellYourFriend newTaf)
 {
     SendMail(newTaf.UserName, newTaf.FirstFriendName, newTaf.UserEmail, newTaf.FirstFriendEmail, newTaf.EmailSubject, newTaf.EmailBody);
     SendMail(newTaf.UserName, newTaf.SecondFriendName, newTaf.UserEmail, newTaf.SecondFriendEmail, newTaf.EmailSubject, newTaf.EmailBody);
     SendMail(newTaf.UserName, newTaf.ThirdFriendName, newTaf.UserEmail, newTaf.ThirdFriendEmail, newTaf.EmailSubject, newTaf.EmailBody);
 }