Changes Required for PHP Forms

Some PHP forms are being rejected because they contain lines longer than SMTP allows. The fix is to add code that will force a word wrap at 70 characters. OIT's self help documents are being modified to include this code, but already existing forms should be modified as shown below.

Examine the code of your php file. Look for the area where you are defining your message. In the example below, we are using message. It may be text, or it may be email or comments.

Scroll down in your file to just above your send an email line and add the below code. Use whatever you have called it, in the example we used message so we are adding the definition of format_message. We also added the comment line // step 4a...

Then modify your send an email line to use the new definition. In the example below it had previously said $message and we have changed it to call $format_message instead, which will word wrap it at 70 characters.

If your form is displaying the entered information back to the screen of the submittor, you will also want to add, or modify your existing line if you do not have it set to word wrap.