-
Notifications
You must be signed in to change notification settings - Fork 7
/
sendmailhtml.aspx.cs
41 lines (36 loc) · 1.25 KB
/
sendmailhtml.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
37
38
39
40
41
using System;
using System.Collections.Generic;
using System.Configuration;
using System.IO;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
public partial class sendmailhtml : PublicUser
{
protected void Page_Load(object sender, EventArgs e)
{
}
protected void btnSend_Click(object sender, EventArgs e)
{
#region send email confirm
try
{
string LogoEmail = ConfigurationManager.AppSettings["LogoEmail"].ToString();
string url = urlDomain + "member/confirm.aspx?code=" + DateTime.Now.Ticks;
StreamReader red = new StreamReader(MapPath("~/email_template/signup.html"));
string body = red.ReadToEnd();
red.Close();
body = string.Format(body, url, LogoEmail);
//send user
PiglobalEmail.SendEmail(txtEmail.Text, "[piglobal.net] Xác nhận kích hoạt tài khoản", body);
}
//catch { }
catch(Exception ex) { Response.Write(ex.ToString()); }
#endregion
}
protected void btnSendText_Click(object sender, EventArgs e)
{
PiglobalEmail.SendEmail(txtEmail.Text, "[piglobal.net] Xác nhận kích hoạt tài khoản", "không có html nha");
}
}