0

I've a web job that is trying to send an email when it reads something from the Azure poision q.

 public static void ProcessPoisonNotification(
        [QueueTrigger("parkingticketnotification-poison")] ParkingTicketNotificationBO notificationBo,
        TextWriter log)
    {
        var message = "xxx xxx xxx xxx xxx => POISON message: " + notificationBo.Dump();
        Console.WriteLine(message);
        log?.WriteLine(message);
        PoisonEmailNotifier.SendFailureMessage(notificationBo);
    }

The Email notifier is using code from the main web applicaiton, which can send emails. but the Web job throws the following exception. Is it because the web application is blocking port 25?

enter image description here

InitLipton
  • 2,277
  • 4
  • 28
  • 45

2 Answers2

1

The Email notifier is using code from the main web applicaiton, which can send emails. but the Web job throws the following exception.

Base on my experience, as the Web application and WebJob are in the same environment, if it is worked in the Web application, it should be also worked in the Azure WebJob.

If WebJob is worked locally, please have a try to remote debug the WebJob. More details about how to remote debug the webjob, please refer to the tutorials.

Note: Click the Settings tab, and change Configuration to Debug, before it is published.

Besides,we also can use Azure SendGrid to send email easily.

Tom Sun - MSFT
  • 22,436
  • 3
  • 23
  • 40
0

That looks like Windows Socket Error Code 10013. You can find out more about it here.

Microsoft has two suggestions - you likely either have insufficient permissions or another service is bound to the target port. If you know that traffic on port 25 is not open on your host, it seems likely that this is the cause. However, you may instead have some other service listening to that port.

Orphid
  • 2,100
  • 1
  • 23
  • 37