Jump to content
  • 0

Send E-Mail To Client, Oh Noes!


EidolonHost

Question

So I was testing the e-mail template I had... on the link: /admin/clients/email/1/

 

... Maybe I should've done it elsewhere, but I didn't see an option to send a customer a pre-formatted email, for example, a service created e-mail as below in the E-mail clients screen under Account Actions from the admin screen.

 

The code was as follows:

Dear {client.first_name} {client.last_name},

PLEASE READ THIS EMAIL IN FULL AND PRINT IT FOR YOUR RECORDS

Thank you for your order from us! Your server has now been setup and this email contains all the information you will need in order to begin using your account.

If you have requested a domain name during sign up, please keep in mind that your domain name will not be visible on the internet instantly. This process is called DNS propagation and can take up to 48 hours. Until your domain has propagated, your website and email will not function.

New Account Information

Hosting Package: {package.package}
Domain: {service.cpanel_domain}
Package Price: {pricing.price}
Package Period: {pricing.period}

Cancellation Fee after 10 days of your first product with us: {pricing.cancel_fee}

Login Details

Username: {service.cpanel_username}
Password: ****** [Password Hidden for security reasons]

If you ordered a control panel to be added to the server at the time of set-up, it'll be the following:
cPanel WebHost Manager URL: http://{module.host_name}:2083/
Once your domain has propogated, you may also use http://www.{module.host_name}:2082/

Server Information

Server IP: {module.host_name}

Thank you for choosing EidolonHost.

The To and From e-mail was:

 

To:

Test client

admin@shattered-tears.com

 

From:

EidolonHost Systems

systems@eidolonhost.com

 

As soon as I press Send E-mail, I get this error:

Oh noes!

unexpected character in filters : "/" at 130 on line 233 in /home/user/public_html/eidolonhost.com/vendors/h2o/h2o/parser.php

Printing Stack Trace:
#0 /home/user/public_html/eidolonhost.com/vendors/h2o/h2o/parser.php(114): ArgumentLexer->parse()
#1 /home/user/public_html/eidolonhost.com/vendors/h2o/h2o/parser.php(75): H2o_Parser::parseArguments(' #2 /home/user/public_html/eidolonhost.com/vendors/h2o/h2o.php(106): H2o_Parser->parse()
#3 /home/user/public_html/eidolonhost.com/vendors/h2o/h2o.php(142): H2o->parse('

#5 /home/user/public_html/eidolonhost.com/app/controllers/admin_clients.php(1280): Emails->sendCustom('systems@eidolon...', 'EidolonHost Sys...', 'admin@shattered...', 'Dedicated Serve...', Array, NULL, NULL, NULL, NULL, Array)

#6 /home/user/public_html/eidolonhost.com/lib/dispatcher.php(111): AdminClients->email()

#7 /home/user/public_html/eidolonhost.com/index.php(21): Dispatcher::dispatch('/admin/clients/...')

#8 {main}

Not sure if it's a bug, but...

Link to comment
Share on other sites

14 answers to this question

Recommended Posts

  • 0

I can see how it would appear easier for the Universal Module to send emails, as per your example, but it would increase the complexity of the module beyond its scope, and would interfere with how the rest of the system handles emails and events already. We have to keep functionality abstracted as much as possible per proper OOP design, or we would end up with a huge mess.

 

Understandable. Thanks for considering it and explaining why it might not be feasible.

Link to comment
Share on other sites

  • 0

Hosting Package: {package.package}

That's not a valid tag. Do you mean {package.name}?

 

 

Ah, whoops. I tried with {package.name} but no go. Slightly different error but still generating an Oh Noes!

 

Only change was changing {package.package} to {package.name}


	Oh noes!
unexpected character in filters : "/" at 124 on line 233 in /home/user/public_html/eidolonhost.com/vendors/h2o/h2o/parser.php



Printing Stack Trace:

#0 /home/user/public_html/eidolonhost.com/vendors/h2o/h2o/parser.php(114): ArgumentLexer->parse()

#1 /home/user/public_html/eidolonhost.com/vendors/h2o/h2o/parser.php(75): H2o_Parser::parseArguments(' #2 /home/user/public_html/eidolonhost.com/vendors/h2o/h2o.php(106): H2o_Parser->parse()

#3 /home/user/public_html/eidolonhost.com/vendors/h2o/h2o.php(142): H2o->parse('


#4 /home/user/public_html/eidolonhost.com/app/models/emails.php(622): H2o::parseString('#5 /home/user/public_html/eidolonhost.com/app/controllers/admin_clients.php(1280): Emails->sendCustom('systems@eidolon...', 'EidolonHost Sys...', 'admin@shattered...', 'New Dedicated S...', Array, NULL, NULL, NULL, NULL, Array)



#6 /home/user/public_html/eidolonhost.com/lib/dispatcher.php(111): AdminClients->email()



#7 /home/user/public_html/eidolonhost.com/index.php(21): Dispatcher::dispatch('/admin/clients/...')



#8 {main}
Link to comment
Share on other sites

  • 0

Do you have a "/" character inside of braces? e.g.: {/}

 

It could be in the HTML or text version of the email, and might even be in an HTML link, if you're using tags there.

 

No, that's the strange part. I checked the code I was using and the only /s that appear is outside of the braces.

 

Perhaps it's the usage of / at all that causes it to throw an error. Let me test this theory and I'll get back to you.

 

Edit:

 

Test 1, pasted directly into the HTML tab without pressing source:

Dear {client.first_name} {client.last_name},

PLEASE READ THIS EMAIL IN FULL AND PRINT IT FOR YOUR RECORDS

Thank you for your order from us! Your server has now been setup and this email contains all the information you will need in order to begin using your account.

If you have requested a domain name during sign up, please keep in mind that your domain name will not be visible on the internet instantly. This process is called DNS propagation and can take up to 48 hours. Until your domain has propagated, your website and email will not function.

New Account Information

Hosting Package: {package.name}
Domain: {service.cpanel_domain}
Package Price: {pricing.price}
Package Period: {pricing.period}

Cancellation Fee after 10 days of your first product with us: {pricing.cancel_fee}

Login Details

Username: {service.cpanel_username}
Password: ****** [Password Hidden for security reasons]

If you ordered a control panel to be added to the server at the time of set-up, it'll be the following:
cPanel WebHost Manager URL: www.{module.host_name}:2083
Once your domain has propogated, you may also use www.{module.host_name}:2082

Server Information

Server IP: {module.host_name}

Thank you for choosing EidolonHost.

Result: FAIL

 

Error that results:


	Oh noes!

unexpected character in filters : "/" at 80 on line 233 in /home/user/public_html/eidolonhost.com/vendors/h2o/h2o/parser.php

Printing Stack Trace:
#0 /home/user/public_html/eidolonhost.com/vendors/h2o/h2o/parser.php(114): ArgumentLexer->parse()
#1 /home/user/public_html/eidolonhost.com/vendors/h2o/h2o/parser.php(75): H2o_Parser::parseArguments(' #2 /home/user/public_html/eidolonhost.com/vendors/h2o/h2o.php(106): H2o_Parser->parse()
#3 /home/user/public_html/eidolonhost.com/vendors/h2o/h2o.php(142): H2o->parse('
??? #4 /home/user/public_html/eidolonhost.com/app/models/emails.php(622): H2o::parseString('
??? #5 /home/user/public_html/eidolonhost.com/app/controllers/admin_clients.php(1280): Emails->sendCustom('systems@eidolon...', 'EidolonHost Sys...', 'admin@shattered...', 'New Dedicated S...', Array, NULL, NULL, NULL, NULL, Array)
#6 /home/user/public_html/eidolonhost.com/lib/dispatcher.php(111): AdminClients->email()
#7 /home/user/public_html/eidolonhost.com/index.php(21): Dispatcher::dispatch('/admin/clients/...')
#8 {main}

Edit: WTF, part of my post went and disappeared.

 

Test 2 with pasting into HTML tab, then pressing source and then pressing Send Email:

 

Results: SEMI-SUCCESS. I say semi-success because I need to check my e-mail configs to make sure all's OK there, but at least it's not throwing a OH NOES! error.

 

Test 3, again with no /s anywhere. This time, I pasted into the HTML tab with the sources button pressed and set the code as follows:

 

Dear {client.first_name} {client.last_name},<br><br>

PLEASE READ THIS EMAIL IN FULL AND PRINT IT FOR YOUR RECORDS<br><br>

Thank you for your order from us! Your server has now been setup and this email contains all the information you will need in order to begin using your account.<br><br>

If you have requested a domain name during sign up, please keep in mind that your domain name will not be visible on the internet instantly. This process is called DNS propagation and can take up to 48 hours. Until your domain has propagated, your website and email will not function.<br><br>

New Account Information<br><br>

Hosting Package: {package.name}<br>
Domain: {service.cpanel_domain}<br>
Package Price: {pricing.price}<br>
Package Period: {pricing.period}<br>

Cancellation Fee after 10 days of your first product with us: {pricing.cancel_fee}<br><br>

Login Details<br><br>

Username: {service.cpanel_username}<br>
Password: ****** [Password Hidden for security reasons]<br><br>

If you ordered a control panel to be added to the server at the time of set-up, it'll be the following:<br><br>

cPanel WebHost Manager URL: www.{module.host_name}:2083<br><br>

Once your domain has propogated, you may also use www.{module.host_name}:2082<br><br>

Server Information<br><br>

Server IP: {module.host_name}<br><br>

Thank you for choosing EidolonHost.

 

Results: SUCCESS. It sends the e-mail out as it should, though with the information and the like blank. I wasn't quite expecting this, so I checked the content of the e-mail after it was delivered by the system and it shows up as:

 

<p>
    Dear ,<br />
    <br />
    PLEASE READ THIS EMAIL IN FULL AND PRINT IT FOR YOUR RECORDS<br />
    <br />
    Thank you for your order from us! Your server has now been setup and this email contains all the information you will need in order to begin using your account.<br />
    <br />
    If you have requested a domain name during sign up, please keep in mind that your domain name will not be visible on the internet instantly. This process is called DNS propagation and can take up to 48 hours. Until your domain has propagated, your website and email will not function.<br />
    <br />
    New Account Information<br />
    <br />
    Hosting Package:<br />
    Domain:<br />
    Package Price:<br />
    Package Period:<br />
    <br />
    Cancellation Fee after 10 days of your first product with us:<br />
    <br />
    Login Details<br />
    <br />
    Username:<br />
    Password: ****** [Password Hidden for security reasons]<br />
    <br />
    If you ordered a control panel to be added to the server at the time of set-up, it'll be the following:<br />
    <br />
    cPanel WebHost Manager URL: www.:2083<br />
    Once your domain has propagated, you may also use www.:2082<br />
    <br />
    Server Information<br />
    <br />
    Server IP:<br />
    <br />
    Thank you for choosing EidolonHost.</p>

 

HOWEVER, test 4 with the HTML tab, and the code pasted straight in, no code edits, just straight up text with the following code:

 

Dear {client.first_name} {client.last_name},

PLEASE READ THIS EMAIL IN FULL AND PRINT IT FOR YOUR RECORDS

Thank you for your order from us! Your server has now been setup and this email contains all the information you will need in order to begin using your account.

If you have requested a domain name during sign up, please keep in mind that your domain name will not be visible on the internet instantly. This process is called DNS propagation and can take up to 48 hours. Until your domain has propagated, your website and email will not function.

New Account Information

Hosting Package: {package.name}
Domain: {service.cpanel_domain}
Package Price: {pricing.price}
Package Period: {pricing.period}

Cancellation Fee after 10 days of your first product with us: {pricing.cancel_fee}

Login Details

Username: {service.cpanel_username}
Password: ****** [Password Hidden for security reasons]

If you ordered a control panel to be added to the server at the time of set-up, it'll be the following:
cPanel WebHost Manager URL: www.{module.host_name}:2083

Once your domain has propogated, you may also use www.{module.host_name}:2082

Server Information

Server IP: {module.host_name}

Thank you for choosing EidolonHost.

 

Results: FAIL, with an OH NOES!

 


	Oh noes!
unexpected character in filters : "/" at 124 on line 233 in /home/user/public_html/eidolonhost.com/vendors/h2o/h2o/parser.php

Printing Stack Trace:
#0 /home/user/public_html/eidolonhost.com/vendors/h2o/h2o/parser.php(114): ArgumentLexer->parse()
#1 /home/user/public_html/eidolonhost.com/vendors/h2o/h2o/parser.php(75): H2o_Parser::parseArguments(' #2 /home/user/public_html/eidolonhost.com/vendors/h2o/h2o.php(106): H2o_Parser->parse()
#3 /home/user/public_html/eidolonhost.com/vendors/h2o/h2o.php(142): H2o->parse('

#4 /home/user/public_html/eidolonhost.com/app/models/emails.php(622): H2o::parseString('#5 /home/user/public_html/eidolonhost.com/app/controllers/admin_clients.php(1280): Emails->sendCustom('support@eidolon...', 'EidolonHost Sup...', 'admin@shattered...', 'New Dedicated S...', Array, NULL, NULL, NULL, NULL, Array)

#6 /home/user/public_html/eidolonhost.com/lib/dispatcher.php(111): AdminClients->email()

#7 /home/user/public_html/eidolonhost.com/index.php(21): Dispatcher::dispatch('/admin/clients/...')

#8 {main}
Link to comment
Share on other sites

  • 0

Phew, hopefully that gave you guys some clues with the results of the tests I just edited into the post before yours, Cody.

 

It seems as if you paste the code I was using into the HTML tab without pressing Source and putting in the <p>s as well as the <br>s, it throws an error.

 

So somehow, pasting the code into the HTML tab, then pressing the source and editing the <p>s and <br>s in does work as one would expect.

Link to comment
Share on other sites

  • 0
It seems as if you paste the code I was using into the HTML tab without pressing Source and putting in the <p>s as well as the <br>s, it throws an error.

 

So somehow, pasting the code into the HTML tab, then pressing the source and editing the <p>s and <br>s in does work as one would expect.

 

Basically, that's what happened. When you paste HTML into the WYSIWYG, HTML tags can interweave with tags you pasted, so you might end up with something like {<span>package.name</}span> or such.

Link to comment
Share on other sites

  • 0

Basically, that's what happened. When you paste HTML into the WYSIWYG, HTML tags can interweave with tags you pasted, so you might end up with something like {<span>package.name</}span> or such.

 

Ah! OK, that does make sense, having seen the results of this.

 

Additionally, I tried test 3 again and when I pressed source, I got the following code:

 

<pre class="prettyprint linenums:0 prettyprinted" style="">
<span class="typ">Dear</span><span class="pln"> </span><span class="pun">{</span><span class="pln">client</span><span class="pun">.</span><span class="pln">first_name</span><span class="pun">}</span><span class="pln"> </span><span class="pun">{</span><span class="pln">client</span><span class="pun">.</span><span class="pln">last_name</span><span class="pun">},</span><span class="pln">

PLEASE READ THIS EMAIL IN FULL AND PRINT IT FOR YOUR RECORDS

</span><span class="typ">Thank</span><span class="pln"> you </span><span class="kwd">for</span><span class="pln"> your order </span><span class="kwd">from</span><span class="pln"> us</span><span class="pun">!</span><span class="pln"> </span><span class="typ">Your</span><span class="pln"> server has now been setup </span><span class="kwd">and</span><span class="pln"> </span><span class="kwd">this</span><span class="pln"> email contains all the information you will need </span><span class="kwd">in</span><span class="pln"> order to </span><span class="kwd">begin</span><span class="pln"> </span><span class="kwd">using</span><span class="pln"> your account</span><span class="pun">.</span><span class="pln">

</span><span class="typ">If</span><span class="pln"> you have requested a domain name during sign up</span><span class="pun">,</span><span class="pln"> please keep </span><span class="kwd">in</span><span class="pln"> mind that your domain name will </span><span class="kwd">not</span><span class="pln"> be visible on the internet instantly</span><span class="pun">.</span><span class="pln"> </span><span class="typ">This</span><span class="pln"> process </span><span class="kwd">is</span><span class="pln"> called DNS propagation </span><span class="kwd">and</span><span class="pln"> can take up to </span><span class="lit">48</span><span class="pln"> hours</span><span class="pun">.</span><span class="pln"> </span><span class="typ">Until</span><span class="pln"> your domain has propagated</span><span class="pun">,</span><span class="pln"> your website </span><span class="kwd">and</span><span class="pln"> email will </span><span class="kwd">not</span><span class="pln"> </span><span class="kwd">function</span><span class="pun">.</span><span class="pln">

</span><span class="typ">New</span><span class="pln"> </span><span class="typ">Account</span><span class="pln"> </span><span class="typ">Information</span><span class="pln">

</span><span class="typ">Hosting</span><span class="pln"> </span><span class="typ">Package</span><span class="pun">:</span><span class="pln"> </span><span class="pun">{</span><span class="kwd">package</span><span class="pun">.</span><span class="pln">name</span><span class="pun">}</span><span class="pln">
</span><span class="typ">Domain</span><span class="pun">:</span><span class="pln"> </span><span class="pun">{</span><span class="pln">service</span><span class="pun">.</span><span class="pln">cpanel_domain</span><span class="pun">}</span><span class="pln">
</span><span class="typ">Package</span><span class="pln"> </span><span class="typ">Price</span><span class="pun">:</span><span class="pln"> </span><span class="pun">{</span><span class="pln">pricing</span><span class="pun">.</span><span class="pln">price</span><span class="pun">}</span><span class="pln">
</span><span class="typ">Package</span><span class="pln"> </span><span class="typ">Period</span><span class="pun">:</span><span class="pln"> </span><span class="pun">{</span><span class="pln">pricing</span><span class="pun">.</span><span class="pln">period</span><span class="pun">}</span><span class="pln">

</span><span class="typ">Cancellation</span><span class="pln"> </span><span class="typ">Fee</span><span class="pln"> after </span><span class="lit">10</span><span class="pln"> days of your first product </span><span class="kwd">with</span><span class="pln"> us</span><span class="pun">:</span><span class="pln"> </span><span class="pun">{</span><span class="pln">pricing</span><span class="pun">.</span><span class="pln">cancel_fee</span><span class="pun">}</span><span class="pln">

</span><span class="typ">Login</span><span class="pln"> </span><span class="typ">Details</span><span class="pln">

</span><span class="typ">Username</span><span class="pun">:</span><span class="pln"> </span><span class="pun">{</span><span class="pln">service</span><span class="pun">.</span><span class="pln">cpanel_username</span><span class="pun">}</span><span class="pln">
</span><span class="typ">Password</span><span class="pun">:</span><span class="pln"> </span><span class="pun">******</span><span class="pln"> </span><span class="pun">[</span><span class="typ">Password</span><span class="pln"> </span><span class="typ">Hidden</span><span class="pln"> </span><span class="kwd">for</span><span class="pln"> security reasons</span><span class="pun">]</span><span class="pln">

</span><span class="typ">If</span><span class="pln"> you ordered a control panel to be added to the server at the time of </span><span class="kwd">set</span><span class="pun">-</span><span class="pln">up</span><span class="pun">,</span><span class="pln"> it</span><span class="str">'ll be the following:
cPanel WebHost Manager URL: www.{module.host_name}:2083

Once your domain has propogated, you may also use www.{module.host_name}:2082

Server Information

Server IP: {module.host_name}

Thank you for choosing EidolonHost.</span></pre>

 

One more question, and then I think we're good here.

 

I notice that the Blesta tags used in test 3 basically disappeared. I assume this is because when Blesta sends the e-mail, it doesn't know to look for the details in the client's product?

Link to comment
Share on other sites

  • 0
I notice that the Blesta tags used in test 3 basically disappeared. I assume this is because when Blesta sends the e-mail, it doesn't know to look for the details in the client's product?

 

I'm not sure what you're asking. All of the details (package, module, service fields) related to a service is available in the welcome email that is sent out when the service is provisioned.

Link to comment
Share on other sites

  • 0

I'm not sure what you're asking. All of the details (package, module, service fields) related to a service is available in the welcome email that is sent out when the service is provisioned.

 

Uh, don't mind that. I was apparently misreading.

 

However... I noticed something in the Universal Module. There is an option to have a welcome e-mail set up... but there's no option to send the customer a welcome e-mail again in the Universal Module that I can find... or if it's there, I'm not seeing where it's at.

Link to comment
Share on other sites

  • 0

Got it.

 

My thanks for troubleshooting what ultimately turned out to be more or less user error. Personally though, I think that doing it as you suggest isn't exactly the right way to go, at least with the Universal Module.

 

Perhaps a checkbox option to enable the ability to resend e-mails from the UM itself?

 

There's a reason I'm suggesting this... and that's the fact that I created the test client and set up the order without the welcome email template in place... so I was testing the ordering process to make sure all went OK. I didn't think about creating the welcome e-mail template until after I ensured that the ordering process worked as best as I could make it work with what I understood.

 

I'm still learning my way about and the lack of documentation does kind of suck. Fortunately, that is being improved upon, so there is that.

Link to comment
Share on other sites

  • 0

I can see how it would appear easier for the Universal Module to send emails, as per your example, but it would increase the complexity of the module beyond its scope, and would interfere with how the rest of the system handles emails and events already. We have to keep functionality abstracted as much as possible per proper OOP design, or we would end up with a huge mess.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...