send email

Hi,

I have a form to let user fill in, and once the user submit, an email will be sent.

I am using a macro “Send a simple e-mail”.

In the form, there is a textbox “comment”, eg. the user key the following:

====
Hi,
This is a testing message.
Thanks.

In OnAfterInsert event, I have the following:

===
$comments={comment};
$mail_message=$comments;

When it display in the email, it will shows the following:

===
Hi,
This is a testing message.
Thanks.

How do I line break for
in the email? I have tried str_replace("
“,”<br>",$comments) but not works.

Create a mymailerscript program that accepts a string representing their message.
Don’t allow single/double quotes in the message.
Then a PHP button that does something like:
$cmd = “path/mymailerscript '”.{my_message_field}."’";
shell_exec($cmd);

Hi,

Another question on the sending of email.

I created a blank application, then I use the send simple email macro. I wanted to trigger this application so that the email can be sent out automatically.

I tried running the URL where my blank application file is stored but the email was not sent. Eg. http://domain/myproject/blank_email/index.php

Is it I am running the wrong file? [LEFT][SIZE=13px]Can anyone kindly advise? [/SIZE][/LEFT]

Thanks.

Check to see if your server’s web user is allowed to do whatever it is you’re trying to do.
Check your logs either way.
Go read RFC-822. Did the email try to go out? If so, what was the response code?
Figure out where your expectations are colliding with reality, adjust one or the other, then try again.

I summarized the process for sending email. I listed the steps in troubleshooting email. Email, at least in this context, has nothing to do with ScriptCase.