Ураааа, остались небольшие правки
This commit is contained in:
parent
e54749d6d7
commit
29e33b79fe
@ -17,7 +17,7 @@ namespace DiningRoomBusinessLogic.MailWorker
|
||||
protected int _smtpClientPort;
|
||||
protected string _popHost = string.Empty;
|
||||
protected int _popPort;
|
||||
private readonly ILogger _logger;
|
||||
|
||||
|
||||
public AbstractMailWorker()
|
||||
{
|
||||
@ -52,8 +52,6 @@ namespace DiningRoomBusinessLogic.MailWorker
|
||||
return;
|
||||
}
|
||||
|
||||
_logger.LogDebug("Send Mail: {To}, {Subject}", info.MailAddress, info.Subject);
|
||||
|
||||
await SendMailAsync(info);
|
||||
}
|
||||
|
||||
|
@ -29,7 +29,7 @@ namespace DiningRoomBusinessLogic.MailWorker
|
||||
objMailMessage.Body = info.Text;
|
||||
objMailMessage.SubjectEncoding = Encoding.UTF8;
|
||||
objMailMessage.BodyEncoding = Encoding.UTF8;
|
||||
Attachment attachment = new Attachment("C:\\Users\\sshan\\OneDrive\\Desktop\\reports\\reportpdf.pdf", new ContentType(MediaTypeNames.Application.Pdf));
|
||||
Attachment attachment = new Attachment("C:\\reportpdf.pdf", new ContentType(MediaTypeNames.Application.Pdf));
|
||||
objMailMessage.Attachments.Add(attachment);
|
||||
|
||||
objSmtpClient.UseDefaultCredentials = false;
|
||||
|
@ -7,6 +7,7 @@ namespace DiningRoomBusinessLogic.OfficePackage
|
||||
{
|
||||
public void CreateDoc(PdfInfo info)
|
||||
{
|
||||
System.Text.Encoding.RegisterProvider(System.Text.CodePagesEncodingProvider.Instance);
|
||||
CreatePdf(info);
|
||||
CreateParagraph(new PdfParagraph { Text = info.Title, Style = "NormalTitle", ParagraphAlignment = PdfParagraphAlignmentType.Center });
|
||||
CreateParagraph(new PdfParagraph { Text = $"с {info.DateFrom.ToShortDateString()} по {info.DateTo.ToShortDateString()}", Style = "Normal", ParagraphAlignment = PdfParagraphAlignmentType.Center });
|
||||
|
@ -563,7 +563,7 @@ namespace DiningRoomUserApp.Controllers
|
||||
}
|
||||
APIClient.PostRequest("api/main/SendComponentsByDateReportToEmail", new ReportBindingModel
|
||||
{
|
||||
FileName = "C:\\Dax\\reportpdf.pdf",
|
||||
FileName = "C:\\reportpdf.pdf",
|
||||
DateFrom = dateFrom,
|
||||
DateTo = dateTo,
|
||||
Email = APIClient.User.Email,
|
||||
|
Loading…
Reference in New Issue
Block a user