DNN 7 - SMTP Test in host settings work, but can't send emails in contact forms - dotnetnuke

All the sites on this DNN installation stopped sending emails yesterday. When you try and test SMTP in host settings, it sends the test email without any issues.
At first I thought my IP might be blacklisted, but then surely the SMTP test would also fail?

I'm pretty sure the Test SMTP setting in Host directly calls the send mail service in DNN's API. But many other emails are queued up for dispatch for scalability.
Check to see if your "Messaging Dispatch" job in Host > Scheduler has been disabled. If not, check the history by clicking the Log icon on the right-hand side of the schedule tasks list. See if there are errors logged in there.
If all is good there, check your Logs in /Portals/_default/Logs for any issues related to messaging or SMTP.

I would start by checking to see if you have defined a valid (usable) email address on your ADMIN account. DNN will "send" emails from whatever the Administrator is in the site settings, so check the email address on that user's profile, make sure that the email/domain is valid and the SMTP settings you are using are allowed to send from that domain.

If you are developed contact-form dynamic module in your DesktopModules folder then you have to call below DNN SendMail method in your submit button click event.
DotNetNuke.Services.Mail.Mail.SendMail(FromEmailAddress, ToEmailAddress, CCEmailAddress, BCCEmailAddress,
DotNetNuke.Services.Mail.MailPriority.Normal,
EmailSubject,
DotNetNuke.Services.Mail.MailFormat.Html,
System.Text.Encoding.UTF8,
EmailBodyMessage, "", "", "", "", "");

Related

Allow dovecot external login

I currently have dovecot and postfix set up, and I can log in locally because rainloop web mail works perfectly fine for both sending and receiving. However, all external login attempts simply fail, even with the correct username and password. How can I allow external logins(any config file changes, etc.)?
Please let me know about any error logs that might help, and I'll add them to this question.
I am not sure about what you mean when you say "External login",
but if you want to connect from a Mail client as Outlook for example, you should follow the steps of this tutorial : https://support.rackspace.com/how-to/dovecot-installation-and-configuration-on-centos/
Then you would be able to connect Outlook (or any other mail client) to your local Postfix mail directory from any server that is connected to the same local network
Hope it helps !

how to send email directly in React Native App

I am progromming about function: send Email to gmail Address directly from React native App.
I searched on Internet and try library: https://github.com/anarchicknight/react-native-communications, https://github.com/chirag04/react-native-mail.
Howerver, they only show me view of Gmail App which I installed in my device.
I want react native app will send directly to Address Email.
My device I tested run on Android Platform.
Thank you so much
You need an email server or an email services to send an email, there is no way you can send an email directly from the client side.
There are several of them in the internet, you can try: MailGun or SendPulse, they got some good free tiers.
Your job is just calling a simple POST method from your app to their APIs.
I have tried, and so far succeeded in testing with iOS, with react-native-email ("npm install react-native-email").
There is a bit of fluffing around when sending the first email as you have to "login" to your email account. But otherwise, test emails are going through fine.
Also, SendPulse is a bulk newsletter service, not for individual emails.
One annoying caveat: it won't work in your emulator. It will return a URL error when you click the send button. But it works fine on a real device. I'm using Expo (and who wouldn't) and it works fine on my iPhone.
Complete code for testing purposes here: https://github.com/tiaanduplessis/react-native-email

Why other devices cannot add my pass

I created a pass. I can add it to my passbook by email or app or web server. When I send it to others to test, they can open it on Mail.app and see a pass, but when they click add button, nothing adds to passbook. Why is it so ?
The issue is because your webServiceURL is HTTP, not HTTPS.
"webServiceURL" : "http://192.168.1.202:8888/passesWebserver/"
The pass will load on your device because you have enabled "Allow HTTP Services" in the PassKit Testing section of the Developer menu in your device's settings.
For non-development devices (or development devices that don't have this option set), the webServiceURL has to be HTTPS.
To fix this, either change your webServiceURL to https://192.168.1.202:8888/passesWebserver/, or ask the people who you are sending the pass to, to Allow HTTP Services (note, they will require development devices to be able to do so).
Also note that if you change to https, your webServiceURL will probably not work because your MAMP server is not configured for SSL on port 8888.

Redirect Loop Problem for Web Policy Agent?

I followed the installation guide for an Apache Web Policy Agent, but it always results in an endless redirect loop between web and application server. Firefox says "The page isn't redirecting properly" and Chrome thinks that "This webpage has a redirect loop". The setup is an Apache 2 on port 80 with a small demo app and a Web Policy Agent, and a Tomcat 7 server on port 8080 with an OpenAM server (the former OpenSSO from Sun):
App URL http://hostname.example.com:80/ (App and Agent, running on Apache 2.2.16)
OpenAM Server URL http://hostname.example.com:8080/openam (running on Tomcat 7.0.12)
The Live HTTP Header Firefox plugin shows that the policy agent and the OpenAM server (i.e. the Apache and Tomcat servers) redirect to each other, although the server sets the SSO Token Cookie correctly. The name of the SSO Token Cookie has the default value "iPlanetDirectoryPro". Any idea how to solve the problem?
After a whole week I finally figured it out, with the help of Stackoverflow and the OpenAM Mailing list. There were two main problems: missing log files and missing cookie domains. Installing the OpenAM server and the Web Policy Agent is difficult, there are a lot of log files and many different configuration options. If you select the wrong options, it won't work. It is impossible to make it work without knowing what is going on, which can only be determined by a suitable log file.
Missing Log for Web Policy Agent : The log level must be set in the "Java properties" files. There are two "Java Properties" files for the Web Policy Agent, OpenSSOAgentBootstrap.properties and OpenSSOAgentConfiguration.properties. The log and debug level which is named com.sun.identity.agents.config.debug.level can and must be defined in both (!) files, and it should be set to the high level, all:4 or all:5. The format is important. Even if you do this, the AgentConfiguration.properties file is only used when the agent is not working in centralized config mode. The profile must be set to "local".
Missing Cookie Domain: Do not forget to enter the right Cookie Domain during the setup of the OpenAM server in the beginning, or add it afterwards if it is missing. On the OpenAM server, go to Configuration > System > Platform and change the Cookie Domain Value to your domain (for instace .example.com) if it is missing. Otherwise the browser will lose your cookie during the redirect process. Somehow I had an empty entry for the cookie domain at the OpenAM server, I guess a forgot a dot (example.com instead of .example.com) so that it was invalid (or something like that).
This troubleshooting site was helpful to locate the problem.
#0x4a6f4672, Your post was absolutely helpful . Some more to add to your answer. The following changes is what i had to do in the config to make it running, at-least getting it running it for alfresco.
com.sun.identity.agents.config.user.mapping.mode=USER_ID(Dont use HTTP_HEADER)
com.sun.identity.agents.config.user.attribute.name=uid
com.sun.identity.agents.config.user.principal=true(Dont use false)
com.sun.identity.agents.config.user.token=SsoUserHeader(Keep it as per what is specified in you application- in my case alfresco)
Now you are not running the Agent in centralised mode but in local mode the setting which is specified for profile attribute can be only set via property file so add the following.
com.sun.identity.agents.config.profile.attribute.fetch.mode=HTTP_HEADER
com.sun.identity.agents.config.profile.attribute.mapping[uid]=SsoUserHeader(whatever you want the header to come in browser as)
As told by 0x4a6f4672, it is difficult to debug and unless you are in local mode , so switch to local mode immediately and start tracing the logs and make the property changes accordingly.

saving appengine mail from spam filters

One of my clients uses Trend Micro InterScan Messaging Security to protect their internal mail services.
Suddenly InterScan decided to filter out all messages coming from Google App Engine.
Unfortunately they haven't been able to whitelist the sender address as each e-mail gets a different one. For example, *3ckihSOVMMHlZHSL.JSMMHlZHSL.JS*#apphosting.bounces.google.com, with everything before the # being variable.
Update I'm including this screenshot of how Interscan sees the incoming e-mail. Notice that all senders are different:
If I look into the e-mail headers, the apphosting domain appears inside the Return-Path field:
Return-Path: <36kSiSwYIBh0883XL3E7.5EH883XL3E7.5E#apphosting.bounces.google.com>
The "From" field looks ok. It says what I set it to say, but the spam filter only looks at the Return-Path.
My client sysadmin doesn't want to whitelist the whole apphosting domain, as it wouldn't be only whitelisting my application.
How could I bypass this e-mail filters if I can't get an unique sender?
Thanks,
You can't change the return-path header of mail sent by App Engine. The way I see it, you have two options:
Whitelist everything from App Engine. Spam from App Engine is not a big problem, because it's expensive to send in the huge numbers spammers need, and we're constantly monitoring for spamming and shutting spammers down.
Whitelist based on the X-Google-Appengine-App-Id header, which will be set to the app ID of your app.
I am not well versed in spam filters, but it seems to me that if it can only whitelist based on one field, it is pretty lame. Unfortunately that does not help you. If this is an important client, and they absolutely refuse to budge, I see two possible paths forward:
Do some research into interscan to see if you can give the client some pointers (tactfully) on how to configure it to whitelist in such a way that your mail can get through, but only your mail.
Maintain a server outside app engine specifically for the purpose of sending emails. You can build a super simple web app that just sends out emails, and call it from within your app engine app.

Resources