Dear Experts,
I did some configuration for email functionality with this Link. In Link there is some steps for AX email functionality and I completed setup up to Configure batch job. Now I have following job to test this settings that my AX Environment sends emails or not. I observe that Email Sending Status for some particular time the Status is Waiting(0) and then turns Failed. Please help me to resolve my issue.
void SentEmail()
{
SysMailer mail;
SysOutgoingEmailTable outgoingEmailTable;
SysEmailItemId nextEmailItemId;
Map map;
str SenderName, SenderEmail, To, Subject, Body;
;
SenderName = "X++.info";
SenderEmail = "test1@gmail.com";
To = "test2@gmail.com";
Subject = "Test Email From AX";
Body = "<B>Hi this is AX World. Hope you receive my email</B>";
nextEmailItemId = EventInbox::nextEventId();
outgoingEmailTable.EmailItemId = nextEmailItemId;
outgoingEmailTable.IsSystemEmail = NoYes::No;
outgoingEmailTable.Sender = SenderEmail;
outgoingEmailTable.SenderName = SenderName;
outgoingEmailTable.Recipient = To;
outgoingEmailTable.Subject = SysEmailMessage::stringExpand(Subject, map);
outgoingEmailTable.Priority = eMailPriority::Normal ;
outgoingEmailTable.WithRetries = false;
outgoingEmailTable.RetryNum = 0;
outgoingEmailTable.UserId = curUserId();
outgoingEmailTable.Status = SysEmailStatus::Unsent;
outgoingEmailTable.Message = Body;
outgoingEmailTable.LatestStatusChangeDateTime = DateTimeUtil::getSystemDateTime();
outgoingEmailTable.insert();
}
Best Regards,
Faqru Shaik
*This post is locked for comments
I have the same question (0)