-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpricingFamily.aspx.cs
36 lines (34 loc) · 1.27 KB
/
pricingFamily.aspx.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
using System;
using System.Net;
using System.Net.Mail;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
public partial class pricingFamily : System.Web.UI.Page
{
protected void SendFamilyPricing_Click(object sender, EventArgs e)
{
using (var client = new SmtpClient("smtp.gmail.com", 587))
{
try
{
if (string.IsNullOrEmpty(SpamCheck.Text))
{
client.EnableSsl = true;
client.UseDefaultCredentials = false;
client.Credentials = new NetworkCredential("[email protected]", "P@radigm");
var mail = new MailMessage();
mail.From = new MailAddress("[email protected]");
mail.To.Add("[email protected]");
mail.Subject = "Family, Maternity, Newborn Pricing Request From Maya McMahon Photography Website";
mail.Body = "Email: " + Email.Text + "\n";
client.Send(mail);
Response.Write("<script>alert('Thanks for your pricing request. Maya will be in touch with you soon.');</script>");
}
}
catch (Exception ex)
{
}
}
}
}