Post by kgrace » Tue Jan 13, 2009 10:36 am

Hey guys - the order email seems to be composed in multipart format.  I'm having a little issue with some email clients that don't render the email correctly and some of the details of the order don't show up. 

My question:  How can i get all of the data that is included in the HTML email to be sent via plain text? Other ideas to make sure all details come through for any client?

Thanks
Kevin

Newbie

Posts

Joined
Wed Dec 31, 2008 1:57 pm

Post by hm2k » Tue Jan 13, 2009 6:02 pm

I must say that if an email can't render it, the problem is with the mail client.

The mail client is NOT RFC compatible and as such rendered useless.

What mail client are you having problems with?

What version of OpenCart are you using?

UK Web Hosting


User avatar
Global Moderator

Posts

Joined
Tue Mar 11, 2008 9:06 am
Location - UK

Post by kgrace » Wed Jan 14, 2009 12:25 am

You are very likely correct.  The email client in question is AtMail, provided via my ISP.  The emails display correctly using Gmail, Thunderbird, etc.  I was just wondering if I could get OpenCart to send all the information text only - so that when crappy clients like my ISP recieve the email, at least our customers would see the detail information.  Here's an example of the email when displayed correctly. 

Code: Select all

Dear Joe ,

Thank you for your interest in The SHSOC Online Store Products. Your order (whose details are listed below) has been received.
Order ID: #496BF-0ED57-01847
Date Ordered: Monday 12th January 2009
Invoice: http://sylvanhillsbaseball.com/ocart/index.php?controller=account_invoice&reference=496BF-0ED57-01847


E-Mail
joe.blow@anywhere.com

Telephone
501-123-4567

Payment Method
Cash On Delivery 		Payment Address
Joe
Blow
123 anywhere lane
North Little Rock
Arkansas
United States
Product 	Model 	Quantity 	Unit Price 	Total
Baseball Registration
� - [Player Name: little bob blow
� - [Birthdate (xx/xx/xx): 02/11/1999
� - [Age on April 30th: 10
� - [Address Street: 123 anywhere lane
� - [Address City: north little rock
� - [Address Zip: 72116
� - [Mothers Name: jennifer blow
� - [Mom Home Phone: 501123456
� - [Mom Work Phone: 501123456
� - [Mom Cell Phone: 501123456
� - [Fathers Name: joe blow
� - [Dad Home Phone: 501123456
� - [Dad Work Phone: 501123456
� - [Dad Cell Phone: 501123456
� - Uniform Shirt Size: Youth Large (14-16)
� - Uniform Pant Size: Youth Extra Large
� - Coach: I want to Head Coach 	101 	1 	$100.00 	$100.00

Subtotal: 	$100.00
Total: 	$100.00

Please visit our website at Sylvan Hills Sherwood Optimist Club for tryout times and dates.

If you have any questions, please call the office at 501.835.5583. Thanks again for choosing The SHSOC Online Store.



Here's what the email shows up like in the webmail client.  As you can see, the detail information captured is not coming across in the webmail.(player name, birthdate, etc)..but I think I'm capturing correctly with OpenCart as it works with Gmail, Thunderbird, etc.

Code: Select all


Dear Joe ,

Thank you for your interest in The SHSOC Online Store Products. Your order (whose details are listed below) has been received.
Order ID: #496BF-0ED57-01847
Date Ordered: Monday 12th January 2009
Invoice: http://sylvanhillsbaseball.com/ocart/index.php?controller=account_invoice&reference=496BF-0ED57-01847


E-Mail
joe.blow@anywhere.com

Telephone
501-123-4567

Payment Method
Cash On Delivery 		Payment Address
Joe
Blow
123 anywhere lane
North Little Rock
Arkansas
United States
Product 	Model 	Quantity 	Unit Price 	Total
Baseball Registration
















	101 	1 	$100.00 	$100.00

Subtotal: 	$100.00
Total: 	$100.00

Please visit our website at Sylvan Hills Sherwood Optimist Club for tryout times and dates.

If you have any questions, please call the office at 501.835.5583. Thanks again for choosing The SHSOC Online Store.


You will notice that I'm using text boxes as options configured on the product page using a post from this forum - and it's working great - just seem to have this issue with this one client.  I've contacted the ISP - but they're not much help.

Any thoughts are appreciated.  I have a work around which is to configure another email client for the shop admin - my concern lies in wondering if other clients will be affected as well.

Thanks,
Kevin

Newbie

Posts

Joined
Wed Dec 31, 2008 1:57 pm

Post by hm2k » Wed Jan 14, 2009 12:42 am

Try contacting Atmail, see what they have to say on the subject.

UK Web Hosting


User avatar
Global Moderator

Posts

Joined
Tue Mar 11, 2008 9:06 am
Location - UK

Post by Qphoria » Wed Jan 14, 2009 1:11 am

I think it's a fair option to be able to send plain or html based emails, just like email clients offer. Perhaps you can strip away html chars before sending.

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by hm2k » Wed Jan 14, 2009 1:35 am

OpenCart can be changed to send text only, but it's not that simple unless you understand what you're doing.

I don't really want to explain how to achieve it when opencart isn't even the problem here.

UK Web Hosting


User avatar
Global Moderator

Posts

Joined
Tue Mar 11, 2008 9:06 am
Location - UK

Post by kgrace » Wed Jan 14, 2009 1:56 am

Cool - I've dropped AtMail a note to see if they can help. 

Thanks,
Kevin

Newbie

Posts

Joined
Wed Dec 31, 2008 1:57 pm

Post by kgrace » Wed Jan 14, 2009 1:59 am

Also- if you don't mind giving some guidance or overview on how to change OC to include all information in the text section of the message - I could give it a try.  I'm fairly new to PHP, but have been coding C and Perl for years.  I'm learning he structure of Open Cart slowly and have made several other mods.

Thanks
Kevin

Newbie

Posts

Joined
Wed Dec 31, 2008 1:57 pm

Post by Qphoria » Wed Jan 14, 2009 2:17 am

Well i know in the library/cart/order.php file there is:

Code: Select all

if ($this->config->get('config_email_send') ) {
	$this->mail->setTo($this->data['email']);
	$this->mail->setFrom($this->config->get('config_email'));
	$this->mail->setSender($this->config->get('config_store'));
	$this->mail->setSubject($this->data['email_subject']);
	$this->mail->setText($this->data['email_text']);
	$this->mail->setHtml(html_entity_decode($this->data['email_html']));
	$this->mail->send();
}
I know we support the text-only email there. So to force it I guess could be changed to:

Code: Select all

if ($this->config->get('config_email_send') ) {
	$this->mail->setTo($this->data['email']);
	$this->mail->setFrom($this->config->get('config_email'));
	$this->mail->setSender($this->config->get('config_store'));
	$this->mail->setSubject($this->data['email_subject']);
	$this->mail->setText($this->data['email_text']);
	[color=red]$this->mail->setHtml($this->data['email_text']);[/color]
	$this->mail->send();
}

(not tested)

That is for orders, do the same for account create

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by hm2k » Wed Jan 14, 2009 8:06 pm

Just remove the setHtml line.

However, I can't remember if it still sends it as a multipart message or not, regardless. Try it.

UK Web Hosting


User avatar
Global Moderator

Posts

Joined
Tue Mar 11, 2008 9:06 am
Location - UK
Who is online

Users browsing this forum: No registered users and 4 guests