Site: http://www.beachbutlerz.com

Issue: When someone buys a gift certificate online, the purchaser is emailed a purchase receipt with the gift certificate information about the recipient and the gift certificate is created (and it can be redeemed), but the recipient of the gift certificate never receives an email.

When I try to manually email the gift certificate to the recipient (/admin/store/gift_certificates) it still doesn't send to the recipient, even though the status message at the top of the screen states:
•The recipient was emailed their gift certificate.
•Successfully updated the certificate.

My failed troubleshooting:
I've tested this with nearly 20 gift certificate purchases -- enabling and disabling differing options in Ubercart and with UC Gift Certificate, and I can't get the email to actually be sent to the recipient, even though the site thinks it sent it successfully. I set the UC Gift Certificate module back to defaults, still no go. I've also tried about 10 different email addresses for the recipient, to see if it was an issue with the gift certificates getting picked up by spam filters, and that doesn't seem the case either.

I've tried installing 6.x-1.x-dev and 6.x-1.1 to trouble shoot this. No worky.

Hosting:
GoDaddy

Ubercart Modules:
I have the following Ubercart Modules on the site.

Ubercart Core:
Cart 6.x-2.2
Conditional Actions 6.x-2.2
Order 6.x-2.2
Product 6.x-2.2
Store 6.x-2.2

Ubercart Core (Optional):
Attribute 6.x-2.2
Catalog 6.x-2.2
File Downloads 6.x-2.2
Payment 6.x-2.2
Reports 6.x-2.2
Roles 6.x-2.2

Ubercart Extra:
Stock 6.x-2.2

Ubercart - payment:
Authorize.net 6.x-2.2
Credit Card 6.x-2.2
Free Order 6.x-1.0-beta4
Gift Certificates 6.x-1.x-dev
Store Coupons 6.x-1.3

I would really appreciate whatever help can be put into this.

Thank you so much!

Comments

teagish’s picture

Nothing? No interest in helping me out with this one? Please kind Drupal Community of brilliant, smart problem solvers, help out another sad, desperate soul teetering on the edge of a cliff.

teagish’s picture

I'm getting closer to figuring out this issue:

I was able to resend a gift certificate to just one of my recipients. In my testing, it was the only email address sent from userA: teagish@gmail.com to userB: teagish@yahoo.com. Ironically, I have my gmail account forwarding to my yahoo account. In the single gift certificate email that finally arrived, The from address is me@localhost.com.

To figure out what part of the site was causing this, I search the site's main DB. I can't don't find any me@localhost.com However, when I looked in the information schema database on the host, it did contain one me@localhost.com in the Process List table.

Not sure what that means.

There is no me@localhost.com in the source code at all.

I uninstalled, then reinstalled the Mime module and UC gift certificate module, and it didn't fix anything.

I'm starting to think that my gift certificate module isn't sending emails with the correct "From" address.

The header of the single email sent from me@localhost is:

From me@localhost.com Fri Mar 12 04:38:02 2010
X-Apparently-To: teagish@yahoo.com via 66.163.178.252; Thu, 11 Mar 2010 20:38:06 -0800
Return-Path:
X-YahooFilteredBulk: 72.167.234.231
X-YMailISG: bGriCK4WLDue4hN0Ox6dm5iF7kwTdcyzAOodi1gJGA7Ye.gl4AMim0Zjc6JI9fcpJgQosZzm.aHnAdG3XWJsF7RSFhrXjv9JDjBakZgT9pFFKH5LR1Ow1F.jNHHmDWZ.gEC48sicjdDcpxzTnQOIcf7fZ9d1_crrpKrF.LWd9E20x8SWbyOKX2s9KMeR_Yx_mMtfpS76d8CmieTiJoZFyMo6oCFkxwKQcRe_pHQhBHJIpZMTDdX9wc_jJpwbCYYKuEggAaD2nw_jTNw0YQAKmQtIPrCbljdCeHSdS5N2LDgLbhVQHEUOeb7DadwbKNlvS.hcaCk5ooxM83r0LfSs10ZC1bPVcj0diK8y3.E2femSPqGISXfGF0oBacmm4h0.hG.WmluK2LoFXEpRRq1rJRyM.t7mJouAb1wgAQA3al55
X-Originating-IP: [72.167.234.231]
Authentication-Results: mta186.mail.sp2.yahoo.com from=beachbutlerz.com; domainkeys=neutral (no sig); from=localhost.com; dkim=neutral (no sig)
Received: from 127.0.0.1 (EHLO p3niout01-001.shr.prod.phx3.secureserver.net) (72.167.234.231)
by mta186.mail.sp2.yahoo.com with SMTP; Thu, 11 Mar 2010 20:38:06 -0800
X-IronPort-AV: E=Sophos;i="4.49,624,1262588400";
d="jpg'145?scan'145,208,217,145";a="1682436"
Received: from p3nlhssl040.shr.prod.phx3.secureserver.net ([97.74.215.135])
by p3niout01-001.shr.prod.phx3.secureserver.net with ESMTP; 11 Mar 2010 21:38:03 -0700
Received: from p3nlhssl040.shr.prod.phx3.secureserver.net (localhost [127.0.0.1])
by p3nlhssl040.shr.prod.phx3.secureserver.net (8.13.8/8.12.11) with ESMTP id o2C4c3TV007192
for ; Thu, 11 Mar 2010 21:38:03 -0700
Received: (from demartini@localhost)
by p3nlhssl040.shr.prod.phx3.secureserver.net (8.13.8/8.12.11/Submit) id o2C4c2Aq007187;
Thu, 11 Mar 2010 21:38:02 -0700
Date: Thu, 11 Mar 2010 21:38:02 -0700
Message-Id: <201003120438.o2C4c2Aq007187@p3nlhssl040.shr.prod.phx3.secureserver.net>
To: teagish@yahoo.com
Subject: You have been sent a gift certificate
Errors-To: accounts@beachbutlerz.com
From: me@localhost.com
Content-Type: multipart/related;
charset=utf-8;
boundary="61b9dc23b3624a45021f9431d6152740"
MIME-Version: 1.0
Content-Transfer-Encoding: 8Bit
X-Mailer: Drupal
Sender: accounts@beachbutlerz.com
Content-Length: 263661

Charlie Sibbach’s picture

Nailed this one, passing it on in case it happens to someone else.

The problem was this line in uc_gift_certificate_mail_cert_notice():

$from = variable_get('uc_store_email_from', ini_get('sendmail_from'));

For whatever reason, uc_store_email_from was unpopulated, even though it's there in the Store Configuration of Ubercart- I guess the name of the variable was changed! In any case, it was returning the default value, ini_get('sendmail_from'), which in this case, was me@localhost.com. This address was getting blocked by spam filters and was in general, very bad.

I tossed used the Devel module to do a variable_set that set the value of this variable to what it should be, and everything works swimmingly.

To the module developer, please check that this variable is actually being set correctly in the newest version of Ubercart, it wasn't in this install, so other people could run into this- thanks!

jasonabc’s picture

Priority: Normal » Critical

am getting this also - the purchaser receives a receipt but the recipient's email never arrives. Setting to critical.

torgospizza’s picture

Will take a look at this tomorrow. I'm extremely surprised that the variable would get changed mid-release. I'll ask around and see if anyone knows about this.

claude’s picture

pleaase it's urgent , module developer , please help us

claude’s picture

we are still waiting , so please can any one help ???

cbassig’s picture

I was facing this problem, too, but believe I found a simple fix.

I changed the setting 'Order Status Gift Certificate' found at the bottom of /admin/store/settings/gift_certificates to 'Completed.' The default setting is 'Payment Received' but during checkout the order was going straight to completed, so no email was being sent since it was skipping the payment received status.

After this change I have been receiving emails.

jday’s picture

#8 worked for me

I left the gift certificate setting to 'payment received' and once the order status is set to 'payment received' the recipient email is sent.

HOWEVER the from address ends up as 'me@localhost.com' !

if I change line 178 in the uc_gift_certificate.module file to

$from = variable_get('site_mail', ini_get('sendmail_from'));
or
$from = variable_get('uc_store_email', ini_get('sendmail_from'));

then the from address at least uses my store email 'sales@mystore.com'
ideally I would like it to use the more pleasing format of "Store Name" just as the order confirmation emails do

cbassig’s picture

I agree that it would be much better for it to use the format 'Store Name' instead of just the email address. I have noticed this module is missing several features you may expect to have and isn't as friendly with Ubercart as other UC contributed modules are. BUT overall its a great idea.

I have not faced the 'me@localhost.com' problem. I think it maybe because I am using the 'HTML' format choice with MIME MAIL module. The MIME module has a setting to set your email address, so it is using that email address as the from address.

blackwidowdc’s picture

#9 worked for me! Thank you! It would be nice if the from address was the purchaser of the gift certificate.

jasonabc’s picture

#9 worked for me also - many thanks

claude’s picture

It also works for me , thank you jday
sorry for being late to check and reply

jrust’s picture

Status: Active » Fixed

fixed in CVS.

torgospizza’s picture

Thanks for committing that, jrust. I had never been able to reproduce it myself. Glad others have found the fix successful!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

Donna Russell’s picture

Priority: Critical » Minor

Hi all,
We had the same problem but have realised it is a Drupal problem in that if you don't have an email address in the Site Information that matches the domain name it will not work. Incidentally password recovery also would not work.
So you must have XXX@domain.com to match the domain name of the site in your Site Information page.

Hope that helps!