The backups are made successfully, but I have not gotten the email notification to work. I have successfully received email from my site using either the PHPmailer or the SMTP Authentication Support modules (I am using Gmail's SMTP server). Currently I am running my site at LocalHost (Mac OS 10.5.6, MAMP), and will eventually run it live from a Mac G5 with XAMPP (yes, I know using a dedicated server is better, but it is a small site and I don't have lots of $$)
Other information:
Drupal 6.13
Backup and Migrate 6.x-2.x-dev
<?php
<?php
<code><code><?php
?>
?>
?>
smtp-6.x-1.x-dev
OR
PHPMailer 6.x-2.1
Any help would be appreciated.
Comments
Comment #1
ronan commentedNotifications use the drupal 'mail' function so if you're site is sending emails then you should be good. Are user signup emails working for example?
If all other emails are working except BandM notifications, let me know and I can look a little more into it.
Comment #2
toomanypets commentedI'm having the same problem with 6.x-2.1. The notifications (line 70 and line 87 of filters.statusnotify.inc) are using the PHP mail() function, not drupal_mail():
The PHP mail function must be loaded with a from address. See http://php.net/manual/en/function.mail.php...
Comment #3
vonn.new commentedI'm having a similar problem.
I have the destination set to an email address. This works great on all the sites I've done except one.
On one site, (my client is using an IIS server) I had a problem with smtp authentication errors not only with B&M but with other system generated emails. I installed the smtp module with phpmailer and have managed to get everything to work except B&M, which still gives me the same smtp authentication error:
mail() [function.mail]: SMTP server response: 503 This mail server requires authentication when attempting to send to a non-local e-mail address. Please check your mail client settings or contact your administrator to verify that the domain or address is defined for this server. in C:\Inetpub\vhosts\mosaicinitiative.org\httpdocs\sites\all\modules\backup_migrate\includes\destinations.email.inc on line 139.
Thanks,
Vonn
Comment #4
boobaaSeems like BandM uses PHP
mail()function instead of thedrupal_mail()wrapper, so BandM will simply ignore anything that plugs into normal Drupal mail handling, which is used by other modules.This has another issue, though: if you have some accented letters in your site name (eg. "Árvíztűrő tükörfúrógép"), mail() does not correctly encodes it (in the subject), so the mail client will show garbled letters (since it's not even informed about the character encoding Drupal uses). I would like to ask to use
drupal_mail()instead of PHPmail()because all of this.Comment #5
HAg commentedStil not fixed
Comment #6
SBanducci commentedI'm having the same problem. BM wont email me anything, backup or notification.
PHPmailer can send but nothing from BandM.
Comment #7
artod4789 commentedI'm having the same issue. The file is created fine as far as I can tell, but no mail comes out of it. But I can get test mail messages just fine using the SMTP module. It's showing that From is an undefined variable. I don't know PHP, so I'm not sure if I can just fix this in the php.ini file or within the filters.statusnotify.inc file.
Thoughts?
This is what I get...
Site was taken offline.
Site was taken online.
Default Database backed up successfully to EDAStaff-2011-10-12T15-24-04 in destination Manual Backups Directory in 671.93 ms. (download, restore, delete)
Error message
Notice: Undefined variable: from in backup_migrate_filter_statusnotify->backup_succeed() (line 70 of D:\DefaultWebSite\sites\all\modules\backup_migrate\includes\filters.statusnotify.inc).
Warning: mail(): "sendmail_from" not set in php.ini or custom "From:" header missing in backup_migrate_filter_statusnotify->backup_succeed() (line 70 of D:\DefaultWebSite\sites\all\modules\backup_migrate\includes\filters.statusnotify.inc).
Comment #8
themic8 commentedThank you this has helped.
I am using BandM 7.x-2.2.
I have added headers to the mail() and now it works.
Comment #9
Anonymous (not verified) commentedAdding the SMTP module fixed this problem for me.
Comment #10
erickbj commentedI believe I might have something to add on this thread. Not sure if I should open another bug as this title is perfect, but maybe the use case is not the same. Anyway, here it goes...
I'm using BM 7.x-2.4. I've noticed that whenever I use the advanced backup feature and the destination is a file to be downloaded, success/failure email notifications will never be sent (considering those 2 checkboxes have been checked).
fwk_backup_perform_backup() calls fwk_backup_destination_save_file() (backup_migrate.module:693) and since the destination is a file to be downloaded it will call the backup_file->transfer() method. That method finally finishes Drupal execution itself by calling module_invoke_all('exit') and exit() (includes/files.inc:346). I believe that's necessary in order not to output any junk at the end of the file. However, because of that, the point where those emails should be sent is never reached.
Sorry I don't have a patch in place, I hope the description is good enough.
Comment #11
mfer commented@afestein the SMTP module will not work. It assumes use of the drupal mail handling system. Backup and Migrate uses the built in PHP mail() function rather than the Drupal mail system. So, SMTP has no way to register itself as an option.
For me this is a problem since I want to use a mail system outside what is configured in sendmail (or by replacing it with Postfix and configuring it at that level).
Note, patch coming.
Comment #12
mfer commentedAttached is a patch to pipe the notification emails through drupal_mail(). I've tested this with the SMTP module and it's working.
Comment #13
mfer commentedThe previous patch was against 7.x-3.x branch. This is against the 7.x-2.x branch and applies to 7.x-2.7. It worked for me when I tested it.
Comment #14
interdruper commentedI have tested the #13 patch using SMTP module and works fine.
Finally this 3-years old issue is solved, at least partially, since #10 keeps unsolved
(mails are not sent when 'Download' destination is chosen)
May be a good idea to move #10 to a new issue and close this one...
Comment #15
ronan commentedLooks good. Committed. Thanks!
Comment #17
emanherz commentedIs it possible to get the same patch for the 3.0 recommended version?
thanks
eric
Comment #18
crystalgrafix commentedIt would be great if this patch is committed for 3.0
Cheers
Comment #19
robertoperuzzoI used patch in #12, but it doesn't work for 7.x-3.x version.
Comment #20
robertoperuzzoComment #21
robertoperuzzoI rewrite #12 patch.
Comment #22
yzan commentedHello ,
I'm trying to send a backup to an e-mail address., It does not work.
I do not receive the email.
The system displays two messages opposite.
Could someone help solve this problem?
Backup and Migrate 7.x-3.6
A screenshot attached ...
Comment #23
nairb commented@yzan - This is a different issue from this thread and should be in a new issue.
You have two different messages because the backup succeeded but the email failed. Your site is trying to send the message but it isn't working. You need to look into the SMTP 530 error. That says that sending failed due to authentication problems. The error also references the STARTTLS not being used. Have you setup and tested email on your server before? It looks like you need to check your settings.
Comment #24
yzan commented@nairb
Hello ,
yes I tried the email with the registration of a new user, then with the form of contact, and finally the sending of the test mail of the modules Smtp.
All work ...
After 4 days of research, I regret that I could not find a solution.
I will continue.
When I find, I will let him know.
Cordially ...
Comment #25
yzan commentedHello,
@nairb
Using development version 7.x-3.x-dev updated 4 Dec 2019 at 12:18 UTC. The message disappears.
The backup is now well received by email.
The file download joins fails with this message "The archive is damaged or its format is unknown"
I read elsewhere that it worked for some users. For me it does not work.
I do not understand ... damage
Comment #26
ivnish