Plone: Getting sent mail status - plone

I was reading https://stackoverflow.com/questions/30020128/tracing-postfix-mail-status In fact I have tried-
from Products.CMFCore.utils import getToolByName
mailhost = getToolByName(context, 'MailHost')
print mailhost.my_mails()
I can't manage to read my sent mail status. Is there any way to get sent mail status? I'm thinking about log file. But getting that info with plone would be nice. Thanks for your suggestion in advance.

Have you looked at http://docs.plone.org/develop/plone/misc/email.html? You get immediate feedback if you're unable to send mail.

Related

Solved How to make the telegram bot write to your channel?

upd: 09.11.20 SOlVED I've made the telegram bot that working good in single conversations of a groups. However right now I want it to send messages right in my channel.
When I'm writing script(after i write straigt to the bot to invoke it by command /start)
import telebot
token = '...'
bot = telebot.TeleBot(token)
#bot.message_handler(commands=['start'])
def default_test(message):
answer = 'Привет!'
bot.send_message('#hello_danishere', answer)
bot.polling(none_stop=True, interval=0)
or doing a html query
https://api.telegram.org/bot/sendMessage?chat_id=#hello_danishere&text=123
i'm getting an error.
{"ok":false,"error_code":400,"description":"Bad Request: chat not found"}
I've already done this things that found in internet:
Give the administator permissions to the bot
Used #mychannelname instead of message.chat.id while invoking send_message
Written smthg in channel cause bot can reply only if you already written him.
SOlVED.
The thing is you need to check three things to success:
1.Your channel responding to link t.me/<nameofPUBLICchannel
2.Your bot has administrative permissions
3.You've already posted smtng on your channel
That helped me

Temporary block from yahoo

For quite some time we have been getting the following error from yahoo:
mail.log:6452:Apr 22 19:21:06 aegir postfix/smtp[8997]: 87BCF4C93F: host mta7.am0.yahoodns.net[67.195.228.110] said: 421 4.7.0 [IPTS04] Messages from 188.93.125.68 temporarily deferred due to user complaints - 4.16.55.1; see https://help.yahoo.com/kb/postmaster/SLN3434.html (in reply to end of DATA command)
If someone did get the similar, how did you solve this issue?
I've been trying to contact Yahoo but everytime I get automated response and ticket closure as I send it.
What other thing I can offer is DMARC report if its relevant:
https://mxtoolbox.com/DmarcReportAnalyzer.aspx?id=F-9a3a8364-6cba-41f9-b93f-cfc32155a3f6
Test for headers and every check seems to be working alright:
https://www.mail-tester.com/test-m5ytebosm
Google email is showing everything is pass:
gmail email
gmail header
For now I've tried changing OpenDKIM to relaxed/relaxed from relaxed/simple.
Removed p=quarantine and added p=none
Sorted out SPF record for official signing domain just in case, added another IP address where resourcecenter is found.
Will provide additional info if needed.

Where to place the email template in IBM BPM 8.5?

I am trying to send email from BPM process Designer,although email is sent but i want to read the Email body content from XML file and i am facing the problem i.e where to place this XML template file on server so that the path is found able to my service at run time.
It will be highly appreciated if anyone can help me how to do this?
Regards,
Awais

IBM Worklight adapter using security tests

I'm using Workilight version 6.0 and I'm trying to use a security test with Workilght's adapter.
First of all, I developed a login page and home page where I'll display some informations after the user will be authenticated.
The authentication seems to be OK because I'm getting the user information and session Id which I'll sent in the cookie of the next HTTP adapter using the security test.
The problem is that I'm getting NullPointerException from the specified adapter but when I execute the request with RestClient, I get the response so the WS is OK.
Any body have an idea about how to that ?
PS: my code was working on worklight V5.0 but not with V6.0
I resolved this issue by deleting non useful Security Test like "MobileSecurityTest".
So before testing your adapter make sure that your declaration in the "authenticationConfig.xml" file is well done.
For more information about that, you can visit this URL :
http://public.dhe.ibm.com/software/mobile-solutions/worklight/docs/v600/08_03_Adapter_based_authentication.pdf
In addition, you have to figure out the root response in the adapter response to see first how looks your received data, otherwise you may be will receive a "NullPointerException" as response if you attempt to get for example "response.result" and the attribut "result" doesn't exist.
Hope that help you for future issues like I got.

iOS Push Notifications error after sending wrong token

I've been implementing a small PHP script which will send Push Notifications to Apple's APN servers.
I've got a database with all device tokens that registered for push notifications within my App.
My script will query the database for the tokens and send them to Apple.
Everything works great with a big but... I manually inserted a wrong token into my table and executed the script again.
I've realized that after that wrong token is sent to Apple, all notifications after that won't reach the devices.
Apple seems not to return any OK if everything worked fine but it does send a KO code if something went wrong. I get an error from Apple for that wrong token but I don't get any response afterwards for all the other notifications.
I open only one connection for all the tokens inside the database.
I prepare a socket context with this line:
$streamContext = stream_context_create(array(
  'ssl' => array(
   'local_cert' => $this->signFile
  )
 ));
Then start a communication channel with the APN servers:
$this->hFile = stream_socket_client(self::$serverUrl[$environment], $err, $errstr, 60, STREAM_CLIENT_CONNECT, $streamContext);
Finally I send the message:
fwrite($this->hFile, $command);
I thought of setting a new connection for every notification but I wanted to ask SO opinion first...
By the way, I know that PHP isn't the best choice for this but it came as a requirement from somewhere else and we are forced to set the system this way.
Thank you and have a nice day,
Alex.
I finally found a solution:
As soon as I detect that a token is invalid, I close the connection and open it again to start sending tokens right after the wrong one.

Resources