public void RequestWithdraw(CustomerWithdrawRequest request) { long id=((DareyaIdentity)HttpContext.Current.User.Identity).CustomerID; var message = SendGrid.GenerateInstance(); message.AddTo("*****@*****.**"); message.From = new System.Net.Mail.MailAddress("*****@*****.**", "dareme.to"); message.Html = "<h1>Withdraw Request</h1><br>Customer ID "+id.ToString()+"<br><br>"+request.Address+"<br>"+request.Address2+"<br>"+request.City+" "+request.State+" "+request.ZIPCode+"<br><br>"; message.Subject = "Withdraw Request: Customer ID "+id.ToString(); var transport = SendGridMail.Transport.SMTP.GenerateInstance(new System.Net.NetworkCredential("daremeto", "3f!margarita")); try { transport.Deliver(message); } catch (Exception e) { System.Diagnostics.Trace.WriteLine("Withdraw request exception for customer "+id.ToString()+": " + e.ToString()); } }
public void RequestWithdraw(CustomerWithdrawRequest request) { long id=((DareyaIdentity)HttpContext.Current.User.Identity).CustomerID; }