Welcome, Guest. Please login or register.
Did you miss your activation email?
May 23, 2012, 08:43:53 PM

Login with username, password and session length
Search:     Advanced search
Wollen Sie dem WebsiteBaker Team beitreten?
Nähere Informationen finden Sie unter hier und auf unserer neuen Webseite.
155441 Posts in 21702 Topics by 7732 Members
Latest Member: Smacki
* Home Help Search Login Register
Pages: [1]   Go Down
Print
Author Topic: Email format sent by form  (Read 636 times)
mikejd

Offline Offline

Posts: 160


« on: September 19, 2008, 12:13:01 PM »

I have now successfully set up my form to send an email. However, the format of the email as received is not very useful. All the fields are shown after one another and not separated - ie.

Name: Mike DaviesEmail: mike@integrawebdesign.co.ukOrganisation: IntegraEvent
type: NoneDate: NoneStart time: NoneEnd time: NoneVenue: NoneEvent details:
Testing 19/09/08 2

is it possible to format the email so that the fields are displayed on separate lines with a space between? Which file do I need to modify?

regards,
Mike
Logged
oslyr

Offline Offline

Posts: 2


« Reply #1 on: October 15, 2008, 09:29:38 AM »

Two small changes in the file class.wb.php solve the problem:

Code:
function mail($fromaddress, $toaddress, $subject, $message, $fromname='')
.
.
.
$message = preg_replace('/[\r\n]/', '<br \>', $message);
.
.
.
$myMail->AltBody = strip_tags($message);

extend it with:
Code:
function mail($fromaddress, $toaddress, $subject, $message, $fromname='')
.
.
.
$original_message = $message;
$message = preg_replace('/[\r\n]/', '<br \>', $message);
.
.
.
$myMail->AltBody = strip_tags($original_message);
Logged
mikejd

Offline Offline

Posts: 160


« Reply #2 on: October 15, 2008, 10:54:27 AM »

Thanks oslyr, that's sorted it.

Mike
Logged
Pages: [1]   Go Up
Print
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!