Board index   FAQ   Search  
Register  Login
Board index PHP PHP Scripts

help required to make date active and create html email

Links for php scripts

Moderators: macek, egami, gesf

help required to make date active and create html email

Postby dicko1976 » Thu May 30, 2013 11:57 pm

Hi

I have a script that sends out an email when a user specifies a event time and date.

1st issue is

The below forms the date and time in my email (this works OK) but I would like it to be noticed when on a smart phone so that it can be added to the calendar. At the moment it just looks like text. I have also had it display the date and time as dS M Y and this doesnt make a difference.


$formdate = date("d/m/Y H.i", $formdate);

2nd issue is

$comment .= $addcomment."\n".GetConfig('defaultmsg');
@mail($info['email'], "$info[subject] (AutoReminder: $formdate)", "Event Date : ".$formdate."\n".$comment, GetConfig('msgheaders'));


I have added the Event Date : and that comes through with the email but I would like to create a HTML email here and put some data out puts into a html table and the logo at the top of the email.

Does anybody have any ideas ?

3rd issue is

As this is a generated email it always goes into junk on my hotmail account. Is there any way to stop this apart from advising the user to check their junk/spam mail ? My host already has SPF turned on for authenticity.

Thanks in advance

Martyn
dicko1976
New php-forum User
New php-forum User
 
Posts: 2
Joined: Thu May 30, 2013 11:54 pm

Re: help required to make date active and create html email

Postby developerahusain » Fri May 31, 2013 2:40 am

For the second issue
You could use php mail function like this.Its very useful martin, I use this code for sending any type of html mail.This will be helpful.
$to =$_POST['to'];
$subject ='Job Opportunity @ m`brace';
$message ='<head>
<title>Untitled Document</title>
<link href="../include/css/style.css" rel="stylesheet" type="text/css" />
</head>

<body>your content</body>';


$headers = "MIME-Version: 1.0" . "\r\n";
$headers .= "Content-type:text/html;charset=iso-8859-1" . "\r\n";

// More headers
$headers .= 'From:'.$_POST['from']."\r\n";

mail($to,$subject,$message,$headers);

For the 1st issue can you please tell me bit clearly so that i can tell you the solution.

Developer ahusain
developerahusain
New php-forum User
New php-forum User
 
Posts: 44
Joined: Tue May 28, 2013 10:04 pm
Location: India,Lucknow

Re: help required to make date active and create html email

Postby dicko1976 » Fri May 31, 2013 2:54 am

Thanks for that I will have a play with that this weekend.

For my issue 1. When I send an email to someone and they view it on a smart phone ie iphone. The date is never active in the email to create an event and add it to their calendar.

If I send the same email date format manually in an email its fine.

Thanks

Martyn
dicko1976
New php-forum User
New php-forum User
 
Posts: 2
Joined: Thu May 30, 2013 11:54 pm


Return to PHP Scripts

Who is online

Users browsing this forum: Google Feedfetcher and 1 guest

Sponsored by Sitebuilder Web hosting and Traduzioni Italiano Rumeno and antispam for cPanel.