Coded something up in Couch in an interesting way? Have a snippet or shortcode to share? Post it here for the community to benefit.
20 posts Page 2 of 2
Works perfect now, thanks a ton. I'm not really that competent with PHP, but comparing the two scripts quickly, it seems odd that those changes are necessary on some hosters (I'm on all-inkl btw). Oh well, I'm ecstatic it works now though, thanks again :)
You are welcome :)
Yes, indeed it is odd how the hosts differ in their approach to a fairly standardized procedure.
Hi KK

I like to send same email to Two nos. Id
Code: Select all
<cms:php>
         EmailEx::send_mail( '<cms:show frm_email />', 'youraddress@gmail.com &  <cms:show job_application_url />', 'Feedback from your site', '<cms:show my_message />' );
      </cms:php>

or
Code: Select all
<cms:php>
         EmailEx::send_mail( '<cms:show frm_email />', 'youraddress@gmail.com',  <cms:show job_application_url />', 'Feedback from your site', '<cms:show my_message />' );
      </cms:php>



Is it possible ? if yes kindly guide me.
@Subhamoy,

The second parameter of EmailEx::send_mail can accept multiple 'to' addresses (separated by comma) e.g. -
Code: Select all
<cms:php>
    EmailEx::send_mail(
        '<cms:show frm_email />',
        'youraddress@gmail.com, address2@gmail.com',
        'Feedback from your site',
        '<cms:show my_message />'
    );
</cms:php>

or -
Code: Select all
<cms:php>
    EmailEx::send_mail(
        '<cms:show frm_email />',
        'youraddress@gmail.com, <cms:show second_address />',
        'Feedback from your site',
        '<cms:show my_message />'
    );
</cms:php>

Hope it helps.
Hi All,

Please pardon me for bumping this post. Pls how do I sent HTML emails with the emailex script? I have tried the following code without success. I am totally OUT OF IDEAS!
Code: Select all
<cms:capture into='my_message'>

                                        <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
                                          <html xmlns="http://www.w3.org/1999/xhtml">
                                             <head>
                                                <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
                                                <title>Online Form Application </title>
                                                <style type="text/css">
                                                body {margin: 0; padding: 0; min-width: 100%!important;}       
                                                table {border-collapse: collapse;  width: 100%; border: 1px solid green;}
                                                th, td {text-align: left;padding: 8px;}
                                                tr:nth-child(even){background-color: #f2f2f2}
                                                th {background-color: #4CAF50; color: white;}
                                                </style>
                                             </head>
                                             <body yahoo bgcolor="#f6f8f1">
                                                
                                                <div style="overflow-x:auto;">
                                                   <table>
                                                      <tr>
                                                         <th>Question</th>
                                                         <th>Response</th>
                                                      </tr>                                                            
                                                      <tr>
                                                         <td>Name:</td>
                                                         <td><cms:show frm_surname /></td>
                                                      </tr>
                                                      <tr>
                                                         <td>Name:</td>
                                                         <td><cms:show frm_firstname /></td>
                                                      </tr>
                                                      <tr>
                                                         <td>Name:</td>
                                                         <td><cms:show frm_email /></td>
                                                      </tr>
                                                      <tr>
                                                         <td>Name:</td>
                                                         <td><cms:show frm_phone /></td>
                                                      </tr>
                                                   </table>
                                                </div>
                                             </body>
                                          </html>
                                      </cms:capture>
                                     
                                      <cms:php>
                                        EmailEx::send_mail( '<cms:show frm_email />', 'edward.babatunde@telinno-consulting.com', 'Online Application Form from your site', '<cms:show my_message />' );
                                      </cms:php>
The Only Nigerian Good Son!
@edydeyemi, we are working on making Couch's native <cms:send_mail> tag work with attachments in a proper way (it already works with HTML mails). That will make this current hack you are working with redundant.

Till that happens though, I am afraid, you'll have to use this hack as it exists at the moment.
Hi @KK

I had a similar trouble once with GoDaddy and had to modify the script a little.
I'm attaching it here. Please test if it works for you.


I tried both scripts for the attachment so far, but nothing works

I receive the email, but not the attached image. It's not very essential, especially if it will be integrated into the script,
but, hey:
any idea?

Attachments

Paolo, the attachment thing is just a hack.
I'll try to see if something more robust is possible using phpMyMailer.
Ha, ok.

Because I removed the PHP mailer solution to use the new <cms:check_spam /> tag and the SMTP Add-on, since I was upgrading. I wasn't sure if there was something else, there's a lot of posts about it now.

But it's not really essential. Customers are contacting me directly most of the time, and I was never really a big fan of letting non-registered user uploading files anyway.

I'll wait for the next version.

Thanks KK
PaoloE wrote: I was never really a big fan of letting non-registered user uploading files anyway.

This makes me see how the task to send attachments can be transformed to the task of sending links to the uploaded securfiles.
20 posts Page 2 of 2