Inhalte aufrufen

Profilbild

Sending Emails from Schedule Task


  • Bitte melden Sie sich an, um eine Antwort zu verfassen.
1 Antwort zu diesem Thema

#1 CompleteCoders

CompleteCoders

    Advanced Member

  • Members
  • PunktPunktPunkt
  • 103 Beiträge

Geschrieben: 16 October 2020 - 18:16

I have a need to send an email on a reoccurring basis so I wrote a scheduled task to do it.  We are running into a problem that the FactoryMessage.cs file has a error handle that doesn't allow system accounts to send an email.  The scheduled task appears to run under the builtin@background-task-record.com account.  Is there a way for a scheduled task to send an email out?  



#2 Marcus Gesing

Marcus Gesing

    SmartStore AG

  • Administrators
  • 3799 Beiträge

Geschrieben: 16 October 2020 - 18:53

Yes, MessageFactory validates MessageContext.Customer but you can use use any customer through MessageContext.Create.
For example here's a message created in context of an order.

Marcus Gesing

Smartstore AG