Forums / General Questions / Email not sent in HTML format

Email not sent in HTML format

Locked
Results 1 to 20 of 20
This thread is locked. New replies are disabled.
06 Jan 2009, 03:31
#1
thinknirmal avatar

thinknirmal

New Zenner

Join Date:
Mar 2008
Posts:
27
Plugin Contributions:
1

Email not sent in HTML format

I am developing a custom page where the user's interests will be emailed to the store manager.

I am using this line of code to send the email:

zen_mail(STORE_NAME,
SEND_TO_ADDRESS,
'Product Interests',
$email_text,
$_SESSION['fullName'],
$_SESSION['email'],
array('EMAIL_MESSAGE_HTML' => $email_html),
'escalate_product_interests');


For some reason the email is not being sent in HTML format. The emails received have no 'text/html' header information. :oops:

All the possible values are enabled in the admin area: MIME HTML, Email Admin Format.

I am not specifying any HTML template for the 'escalate_product_interests' . So I believe it uses the default template.

What could be the problem? Please help. Thank you.
06 Jan 2009, 04:23
#2
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Posts:
31,500
Plugin Contributions:
4

Re: Email not sent in HTML format

To whom are you sending this test to?
06 Jan 2009, 04:25
#3
mprough avatar

mprough

Totally Zenned

Join Date:
Nov 2007
Posts:
4,260
Plugin Contributions:
34

Re: Email not sent in HTML format

Is the user account you are sending too accepting html... their account is it text or html as their choice?

~Melanie
06 Jan 2009, 04:33
#4
thinknirmal avatar

thinknirmal

New Zenner

Join Date:
Mar 2008
Posts:
27
Plugin Contributions:
1

Re: Email not sent in HTML format

mprough:

Is the user account you are sending too accepting html... their account is it text or html as their choice?


The account the email being sent to is Gmail. It's obvious that Gmail accepts HTML messages. I am sending the mail using smtpauth using Brinkster Mail. I checked with the host and they said they have no restriction in sending HTML mails.
06 Jan 2009, 04:36
#5
mprough avatar

mprough

Totally Zenned

Join Date:
Nov 2007
Posts:
4,260
Plugin Contributions:
34

Re: Email not sent in HTML format

thinknirmal:

The account the email being sent to is Gmail. It's obvious that Gmail accepts HTML messages. I am sending the mail using smtpauth using Brinkster Mail. I checked with the host and they said they have no restriction in sending HTML mails.


When ZC accounts are created whether admin or not the account is dubbed text or html, regardless of the email account ZC will only send text to a text account.

~Melanie
06 Jan 2009, 05:10
#6
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Posts:
31,500
Plugin Contributions:
4

Re: Email not sent in HTML format

Also if this is the admin email account of record, then emails to the admin are always as text
06 Jan 2009, 05:15
#7
thinknirmal avatar

thinknirmal

New Zenner

Join Date:
Mar 2008
Posts:
27
Plugin Contributions:
1

Re: Email not sent in HTML format

Thank you for the sincere reply.

kobra:

Also if this is the admin email account of record, then emails to the admin are always as text


Then how to go about with HTML emails?
I am sending the email to [email protected].
[email protected] is registered as Admin.
06 Jan 2009, 05:23
#8
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Posts:
31,500
Plugin Contributions:
4

Re: Email not sent in HTML format

Use another address or BETTER yet change your admin email to one that is representative of your company...
You do not see or receive email from amazon, MicroSoft, or any other "real" company from a gmail or Yahoo addy

I woud "freak" if I received a valid email from paypal from a gmail account
06 Jan 2009, 05:44
#9
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,506
Plugin Contributions:
173

Re: Email not sent in HTML format

kobra:

Also if this is the admin email account of record, then emails to the admin are always as text


thinknirmal:

Then how to go about with HTML emails?
I am sending the email to [email protected].
[email protected] is registered as Admin.


Admin-copy emails are sent as HTML if you have the "Send Admin emails as ..." set to HTML in Admin->Configuration->Email Options (and of course have Send as MIME HTML enabled)
06 Jan 2009, 05:55
#10
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Posts:
31,500
Plugin Contributions:
4

Re: Email not sent in HTML format

Opps!!! Who put that switch there???
06 Jan 2009, 06:00
#11
thinknirmal avatar

thinknirmal

New Zenner

Join Date:
Mar 2008
Posts:
27
Plugin Contributions:
1

Re: Email not sent in HTML format

DrByte:

Admin-copy emails are sent as HTML if you have the "Send Admin emails as ..." set to HTML in Admin->Configuration->Email Options (and of course have Send as MIME HTML enabled)


Thank you for the reply, DrByte!

I have the following settings:

Use MIME HTML When Sending Emails: true
Email Address (Displayed to Contact you): [email protected]
Email Address (sent FROM): [email protected]
Email Admin Format: HTML


I am sending the email with this code:

zen_mail(STORE_NAME, '[email protected]', 'Some subject', $email_text, 'Mr.Customer', '[email protected]', array('EMAIL_MESSAGE_HTML' => $email_html), 'product_interest_page');



Everything above seems fine. But no luck! :dontgetit
06 Jan 2009, 06:02
#12
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Posts:
31,500
Plugin Contributions:
4

Re: Email not sent in HTML format

I messed up on the setting I missed BUT stand by my comments about looking "professional"
06 Jan 2009, 06:19
#13
thinknirmal avatar

thinknirmal

New Zenner

Join Date:
Mar 2008
Posts:
27
Plugin Contributions:
1

Re: Email not sent in HTML format

kobra:

Use another address or BETTER yet change your admin email to one that is representative of your company...
You do not see or receive email from amazon, MicroSoft, or any other "real" company from a gmail or Yahoo addy

I woud "freak" if I received a valid email from paypal from a gmail account


Thank you for the advice.

I am using the gmail account only for testing purposes. When the site goes public, I should link it to the address in the company's domain.

Now because you told me to be, I changed the admin ID to the company mail id. Still not working. Any idea please?
06 Jan 2009, 06:20
#14
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,506
Plugin Contributions:
173

Re: Email not sent in HTML format

thinknirmal:

Thank you for the reply, DrByte!

I have the following settings:

Use MIME HTML When Sending Emails: true
Email Address (Displayed to Contact you): [email protected]
Email Address (sent FROM): [email protected]
Email Admin Format: HTML


I am sending the email with this code:

zen_mail(STORE_NAME, '[email protected]', 'Some subject', $email_text, 'Mr.Customer', '[email protected]', array('EMAIL_MESSAGE_HTML' => $email_html), 'product_interest_page');



Everything above seems fine. But no luck! :dontgetit


I just tested it, and had the same problem. However, adding a customer record using the destination email address (from your example) of '[email protected]' and setting their preferences to HTML format gets around the problem.

As for a long-term fix, there are many improvements to the whole email infrastructure in 2.0.0 which will make this sort of thing easier to overcome ;)
06 Jan 2009, 06:31
#15
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Posts:
31,500
Plugin Contributions:
4

Re: Email not sent in HTML format

Now because you told me to be, I changed the admin ID to the company mail id. Still not working. Any idea please?

I am old and thought that there was a reason that the admin address was not reliable and "forgot" about the switch cause I guess it does not work....

Now that you have changed it create a test customer with the gmail addy and test your email there
And for later if you are going to use PayPal you can not buy from yourself for testing. You will need another paypal account to perform testing with
06 Jan 2009, 06:36
#16
thinknirmal avatar

thinknirmal

New Zenner

Join Date:
Mar 2008
Posts:
27
Plugin Contributions:
1

Re: Email not sent in HTML format

DrByte:

I just tested it, and had the same problem. However, adding a customer record using the destination email address (from your example) of '[email protected]' and setting their preferences to HTML format gets around the problem.

As for a long-term fix, there are many improvements to the whole email infrastructure in 2.0.0 which will make this sort of thing easier to overcome ;)


Wonderful. That workaround is simply working! :clap:

Thank you for the help, DrByte!
Glad that the 2.0.0 is going to have improved mechanisms!
06 Jan 2009, 08:21
#17
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,506
Plugin Contributions:
173

Re: Email not sent in HTML format

kobra:

I ... thought that there was a reason that the admin address was not reliable and "forgot" about the switch cause I guess it does not work....

Actually, it does work just fine.
NOTE: The "admin emails as HTML" switch only gets used if the email is being sent as a copy of an email normally sent to the customer. It doesn't affect emails sent to the storeowner specifically.
06 Jan 2009, 08:28
#18
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Posts:
31,500
Plugin Contributions:
4

Re: Email not sent in HTML format

switch only gets used if the email is being sent as a copy of an email normally sent to the customer. It doesn't affect emails sent to the storeowner specifically.

Precisely, so it does not function as the OP was using it - Sending an email to his admin addy
06 Jan 2009, 08:40
#19
thinknirmal avatar

thinknirmal

New Zenner

Join Date:
Mar 2008
Posts:
27
Plugin Contributions:
1

Re: Email not sent in HTML format

@DrByte

Oh, got the point! Thank you!


@kobra

What is OP?
06 Jan 2009, 08:43
#20
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Posts:
31,500
Plugin Contributions:
4

Re: Email not sent in HTML format

OP=Original post or poster