public async Task <string> SendEmailAsync(string to, string subject, string body, EmailType type, string from = "*****@*****.**") { requestBody = new ServiceReferenceSMTP.SendRequestBody(); requestBody.msgTo = to; requestBody.msgFrom = from; requestBody.msgBody = GetTemplate(type, body); requestBody.msgSubject = subject; ServiceReferenceSMTP.SendRequest sendRequest = new ServiceReferenceSMTP.SendRequest(requestBody); soap = new ServiceReferenceSMTP.SMTPSoapClient(new EndpointConfiguration()); var result = await soap.SendAsync(sendRequest); return(result.Body.SendResult); }
public SendRequest(ServiceReferenceSMTP.SendRequestBody Body) { this.Body = Body; }