Question

So I have a question that some more experienced individuals may be able to shed some light on and steer me in the correct direction. Here is what I have and what I am trying to do.

I have tinymce up and working just fine on a php webpage, of course that is until I go to submit it.

I am trying to use tinymce as the text editor for an email body that I am inserting into a vbscript then calling wsh to execute the .vbs. Everything works fine when I really don't edit the text. Just typing in and submitting without any colored text or other formatting.

However, if I do anything to the text at all it causes the .vbs not to execute. Upon opening up the unexecuted file I see that the "#" character for example when tinymce inserts the span color is causing it to hang.

I have googled and not found this issue presented is there something that I am missing? Or is there a better way to go about sending html emails from a webpage based text editor?

As I said as long as I don't really want to edit the text it works but I could do that plainly with a simple textarea but that defeats the purpose of wanting to be able to produce formatted emails.

Any and all suggestions are greatly appreciated. Thank you in advance for your time and help.

Was it helpful?

Solution

E-Mail Example:

// Sending an email with PHP
    $to = $email; // Send email to our user
    $subject = 'Email Sent with PHP'; // Give the email a subject
    $message = '
           <html>
           <head>
           </head><body>
           <h3>Hey!</h3>
           </body>
           </html>

    '; // Our message above including the link

    $headers = 'From:nobody@nowhere.com' . "\r\n"; // Set from headers
    $headers .= "MIME-Version: 1.0\r\n";
    $headers .= "Content-Type: text/html; charset=ISO-8859-1\r\n";

    mail($to, $subject, $message, $headers); // Send our email
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top