Just getting started with Moodle development and am surprised I can't find a documentation reference on how to globally disable sending of outbound mail. For example, if I have a local dev environment using a copy of a production db, and need to run the cron job for testing purposes, I don't want to risk actually sending mail (in other frameworks I would have that mail sent to stdout or to a log instead).
I have set in config.php:
$CFG->debug = 38911;
$CFG->debugdisplay = true;
but am looking for something like
$CFG->debug_mail ="/logs/moodle_mail.log"
or similar. How is this problem normally solved?
$CFG->noemailever = true;
As documented in config-dist.php ( https://github.com/moodle/moodle/blob/master/config-dist.php#L560 )
If you're running in development and need to see the emails that are generated, my suggestion is to enable email and change your SMTP settings to use something like MailCatcher.
This will let you actually see the emails that are being generated, rather than them disappearing into a black hole.
Related
I want to know if there is a package out there that allows people to receive emails / drafts / deleted items from for example gmail. I found something that seemed to attempt it but I think the support has stopped for it and also my gmail automatically blocks any login attempts from it (which I can evade but if I want to eventually release it then of course this is not the correct option)
The "Potentially non supported" package: imap_client
I was wondering if someone has found a better / new package that doesn't have that issue or if someone knows how to write one.
Thanks in advance
Didn't really understand if you want to send it using SMTP or if you want to open the mail app.
For sending programmatically: https://pub.dev/packages/mailer
To open the gmail app: https://pub.dev/packages/flutter_email_sender
First of all I'm running lamp ubuntu 14.04 with dovecot and postfix for mailing.
I'm quite unexperienced if it comes to setting up a mail server.
I'm reaching a score of 5.1 / 10 and my mail does arrive on my gmail account, but not to my hotmail email. Here are the biggest problems reported by mail-tester
The mail will mainly be newsletter kind of things so the html problems I suppose should be fixed if I actually send a properly formatted html mail instead of some plain text lorem ipsum. Would be great if there's a solution for that as well, but it's not my biggest concern.
I'm using the header_checks in postfix trying to remove the X-MSMail-Priority, but without success. I can't find anything else besides the header checks method. Here's the line I'm using that I thought should remove X-MSMail-Priority
/^X-MSMail-Priority:/ IGNORE
Please say so if I've forgotten something important or something is unclear. I'll update my question as quickly as possible
Make sure you spelled the header correctly, it's case sensetive.
I'm assuming you have a file named /etc/postfix/header_checks,Check your main.cf file for the following:
mime_header_checks = regexp:/etc/postfix/header_checks
header_checks = regexp:/etc/postfix/header_checks
Restart postfix service and test the configuration.
I'd like to create and edit notes created by the iOS Note app programmatically from the server-side.
I can see the notes created by the iOS device in my IMAP folder but any changes I make won't show up on the iOS device.
Does such API exist?
I just wondered myself and tried editing the note with mutt. As emails (via imap anyway) are not meant to be edited (as correctly stated by #CodaFi) mutt copies the note into the editor, saves it as a new "email" and delete the old one. The edited note gets synced to Notes.app just fine.
Beware: The title/subject of the note/mail is derived from the first line of the body.
PS (I don't think it affects the validity of the above): My setup is private IMAP server & mbsync with local Maildir & mutt.
Well, I use the HeaderTools plugin with Thunderbird to accomplish this, so it's certainly possible. The notes app picks up the changes right away. ( I's not a very satisfying solution as HeaderTools only allows editing as html source in its own viewer/editor )
I guess you could fire up wireshark to investigate precisely what goes on.
The drafts theory sounds plausible. If I needed to dig into this, I think I would just try it out with python directly, instead of googling around for hours.
I am trying to create a very simple (text based for now) email app for receiving emails. So far i have used this code :
http://www.javaer.org/j2ee/3-javamail/8-javamail-connecting-gmail-using-pop3-with-ssl
The problem is that i when i run this code i am able to get the new emails, only for once. For example if i have a new message in inbox the first time i will this code it will show it but then it wont. Also it seems that i cant see the body contents of the emails which is strange. I was told that it should be better to use imap protocol but i am not entirely sure how.
Specified example really starts once and scans folder and exits (and see answer on POP that removes mail). From description you need some loop that periodically checks catalog and extracts new mails. Look at some swing examples in your JDK how to write window-based program with event loop. You can start dedicated thread that once per minute checks POP server catalog
I am currently trying to make a form for a website in work. I have created the script in Perl using Forms2Go and have entered the send mail and bin paths given to me. At the first the script wouldn't execute but the hosts made changes to the sever and now it does.
Problem now is the script executes and takes the user to the thank you page but doesn't send the form to the e-mail address which has been tested by the hosting company.
I have a feeling that the send-mail path isn't correct and that is why it is executing but not sending the email, anything else it might be?
Thanks for reading.
Tom
Forms To Go is payware and they do not provide their source code publicly which makes trouble-shooting by the general Internet populace rather difficult. Try their support forum instead. If you're looking for a form mailer that does not suck, install nms TFMail.