vanjarosoftware / Vanjaro.Platform

Vanjaro is all-in-one integrated Website Builder, CMS, Online Store, Memberships, and Digital Marketing platform that grows with your business.
https://www.vanjaro.com
MIT License
57 stars 25 forks source link

Email queued but not sending #1851

Closed tharris9d closed 3 years ago

tharris9d commented 3 years ago

Vanjaro Platform 1.2

I am adding Test Emails to the Queue and also have registration emails in the queue.

Expected behavior Email should send. Would be nice if Test emails could be sent out immediately so that settings can be checked.

Current behavior Emails queued and not sent with errors in the log.

I upgraded to 1.2, Cleared server and client caches, cleared cookies and restarted application. It's not working. I am getting this exception in the log. I am using the same working SMTP settings I use in DNN.

Log Error **General Exception

AbsoluteURL DefaultDataProvider DotNetNuke.Data.SqlDataProvider DotNe

AbsoluteURL:

DefaultDataProvider:DotNetNuke.Data.SqlDataProvider, DotNetNuke

ExceptionGUID:4c1afc63-24b0-47ab-96eb-c52e44a27426

AssemblyVersion:

PortalId:-1

UserId:-1

TabId:-1

RawUrl:

Referrer:

UserAgent:

ExceptionHash:IARkitwahaHXvB5ygJS4WyrcDYs=

Message:Object reference not set to an instance of an object.

StackTrace:

at Vanjaro.Core.Providers.Mail.VanjaroMailProvider.SendMail(MailInfo mailInfo, SmtpInfo smtpInfo) InnerMessage:

InnerStackTrace:

Source:Vanjaro.Core.Providers.Mail.VanjaroMailProvider

FileName:

FileLineNumber:0

FileColumnNumber:0**

eswanzey commented 3 years ago

If further information is necessary I'm seeing this behavior as well.

mksmanish79 commented 3 years ago

Can you confirm if you have specified port no in Server and port setting?

mksmanish79 commented 3 years ago

How frequently the Object reference not set to an instance of an object is logged? Any scenario when the issue is logged?

tharris9d commented 3 years ago

Maybe my syntax is wrong. 9dmail.9di.com:465 for secure mail. I've tried it without the port too. Also tried without SSL. Nothing works. I also get this error when trying to send a site log exception error using the email tool. Perhaps this will help?

General Exception

AbsoluteURL /API/Logs/Email/EmailLogItems DefaultDataProvider DotNetN

AbsoluteURL:/API/Logs/Email/EmailLogItems

DefaultDataProvider:DotNetNuke.Data.SqlDataProvider, DotNetNuke

ExceptionGUID:95a79ee8-1a72-4bdb-b541-745b8af7fb1e

AssemblyVersion:

PortalId:-1

UserId:-1

TabId:-1

RawUrl:

Referrer:

UserAgent:

ExceptionHash:k7Ofx8vO4hdtVLZwsMuaoImpmnE=

Message:Cannot import nodes of type 'Document'.

StackTrace:

at System.Xml.XmlDocument.ImportNodeInternal(XmlNode node, Boolean deep) at Dnn.PersonaBar.AdminLogs.Components.AdminLogsController.GetExceptions(IEnumerable1 logIds) at Dnn.PersonaBar.AdminLogs.Components.AdminLogsController.EmailLogItems(String subject, String fromEmailAddress, String toEmailAddress, String message, IEnumerable1 logItemIds, String& error) at Vanjaro.UXManager.Extensions.Menu.Logs.Managers.LogsManager.EmailLogItems(EmailLogItemsRequest request, UserInfo UserInfo, PortalSettings PortalSettings) InnerMessage:

InnerStackTrace:

Source:System.Xml

eswanzey commented 3 years ago

I can simplify further. I have Vanjaro Platform v1.20 with Live Forms installed. Live Forms is sending through just fine. Note that it's not using the mail queue but is using the existing SMTP settings (external mail server, no port specified, use SSL is checked).

I can view the external mail server logs and can of course see the Live Forms activity. There is no activity logged for the queue mail. Typically that points to the issue being a failed login. That would also explain why in hybrid sites, the DNN side sends mail and the Vanjaro side doesn't.

mksmanish79 commented 3 years ago

Can you please try by adding port no in your SMTPServer like below.

Without SSL - smtp.test.com:25 With SSL - smtp.test.com:465

eswanzey commented 3 years ago

In my case, port number is required and works as expected. What happened in my case was the initial setup had no port number. After the Vanjaro message service persistently failed to connect to the mail server, alarms were triggered on the mail server that would then block the Vanjaro requests in the mail server’s firewall. These requests would then never get logged on the mail server.

From: @. @.> Sent: Tuesday, October 19, 2021 1:57 AM To: vanjarosoftware/Vanjaro.Platform @.> Cc: eswanzey @.>; Comment @.***> Subject: Re: [vanjarosoftware/Vanjaro.Platform] Email queued but not sending (#1851)


Can you please try by adding port no in your SMTPServer like below. Without SSL - smtp.test.com:25 With SSL - smtp.test.com:465 — You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android. [Image removed by sender.]

eswanzey commented 3 years ago

We use SmarterMail and "With SSL - smtp.test.com:465" doesn't work, but using port 587 does. It's described as a "Submission Port TLS" in SmarterMail.

tharris9d commented 3 years ago

I was able to get a new registration and test email to work with port 25. Port 465 is not working. Also the queue is still stuck.

mksmanish79 commented 3 years ago

I was able to get a new registration and test email to work with port 25. Port 465 is not working. Also the queue is still stuck.

can you share full screenshot of mailqueue table and smtp settings ui?

mksmanish79 commented 3 years ago

For immediate resolution add port no.