Latest Post
Tampilkan postingan dengan label Html email. Tampilkan semua postingan
Tampilkan postingan dengan label Html email. Tampilkan semua postingan

Amazon Simple Email Service SMTP using PHP Mailer

Written By Unknown on Minggu, 21 Oktober 2012 | 08.10

Few days back I had enabled email notification system using Amazon Simple Email Service SMTP implemented with PHP Mailer class, I hope the following tutorial will help you to enable email notification system for your web projects. 

To read more about this article Click Here

 For Demo Click Here

To download files Click Here

Sending e-mail from localhost in Windows Environments using PHP

Written By Unknown on Kamis, 30 Agustus 2012 | 10.23

Sometimes You face problems sending email from the localhost while using XAMPP or WAMP or any other PHP servers in windows environment. Actually PHP sevrer needs some configuration changes. In this article I will explain you how to send e-mail from localhost in PHP.


To read more about this article Click here

Email Error Logs with PHP

Written By Unknown on Minggu, 12 Agustus 2012 | 08.35

In today’s video quick tip, we’ll review the process of setting custom error handlers with PHP. Along the way, we’ll also learn how to log and email those potential errors to ourselves. That way, even when your web application has been deployed, you’ll be the first to know when an error is encountered. 


To read more about this article Click Here

Click Here to download files



 

13 tips for better HTML emails

Written By Unknown on Minggu, 02 Januari 2011 | 22.37


Designing and sending HTML newsletters can be a little tacky sometimes. The output of HTML in email apps is still much more limited than in web browsers, which means that you have to adapt the way you are designing your email templates. Following are a few tips to improve the HTML of your newsletters.

1. Use inline CSS styles

Unfortunatly you’ll have to forget about external style for email template design. The best solution is to declare the CSS in your HTML tags like that: <p style=”color:#000;”>. If you declare your CSS in your header, Gmail will not read it which you do not want.

2. Limit the width of your template

When creating a template for your email campaigns, don’t forget that many of your subscribers will read it in an online email app like Gmail or Hotmail. Most email software will have a sidebar that takes away some space, so it would be safe to have a template that doesn’t overpass 600px wide.

3. Avoid using too many images

Most of the time email apps will block images unless the user allows them, so you should not rely too much on images for your email understanding or the readers will just see an empty (or almost) email.

4. Offer a link that lets the subscribers unsubscribe

This is just good manners, don’t force your newsletter subscribers to stay subscribed if they don’t want to. What would you think if sales people locked the door behind you when you enter a shop?

5. Let your subscribers access the web version of the email

This gives you a way to offer a well layed-out version of your email to readers who can’t read it in their email app.

6. Don’t use flash

Most email clients will not read flash objects, so it’s not a very good idea to include it. Sometimes it will even give you security alerts.

7. Suggest to your readers to add you to their contact list

By doing this, you’re inviting your subscribers to create a closer relationship, but you also avoid getting your email ending up in the spam folder and get a better chance to have your images displayed.

8. Don’t use forms in your emails

It will not work in most email readers, just link to a form on the web.

9. Add the dimensions to images

Adding dimensions will help by showing a placeholder when images are not displayed, which will help for not breaking your layout even when images are not shown.

10. Provide an alternate text to all your images

If the images are not shown, let the users know what they are missing.

11. Don’t use PNGs with alpha transparency

Some email apps will not display PNG transparency, Lotus Notes 6 and 7 will not even display PNGs at all, so why bother? I’m afraid that you’ll have to wait that email apps evolve.

12. Don’t use CSS images

CSS background images (example: background:url(image.jpg);) will not display in many email programs, so try to avoid them.

13. Have a text-only version of your email

For the readers who can’t access your HTML email, make sure they can read it by providing a text-only version of the newsletter.

Send Email Notifications for Broken Images Using jQuery AJAX

Written By Unknown on Selasa, 14 Desember 2010 | 23.11

It's usually best to repair broken image paths as soon as possible because they can damage a website's credibility. And even worse is having a user tell you about it. Using jQuery and PHP, you can have your page automatically notify you of broken images.


The PHP


if(isset($_POST['image']))
{
$to = 'errors@yourdomain.com';
$from = 'automailer@yourdomain.com';
$subject = 'Broken Image';
$content = "The website is signaling a broken image!\n\nBroken Image Path:  ".stripslashes($_POST['image'])."\n\nReferenced on Page:  ".stripslashes($_POST['page']);
$result = mail($to,$subject,$content,'From: '.$from."\r\n");
die($result);
}


I keep the email short and to the point; it contains the broken image's src attribute and the page it was requested by.

The jQuery JavaScript


$(document).ready(function() {
$('img').error(function() {
$.post('ajax-image-error-jquery.php', { 
image: $(this).attr('src'), 
page: window.location.href 
}, function() { 
//hide the image? 
});
});
});

For every image, we listen for the error event. When a broken image is discovered, an AJAX request is sent to the above PHP script.

Of course, if the page experiences high traffic before you can fix the image path, you'll have quite a few emails. You may prefer to store the error in a database table and check that often.

Sending e-mail from localhost in PHP in Windows Environment

Written By Unknown on Selasa, 31 Agustus 2010 | 02.04


Have you ever been frustrating, why e-mail is not going from the localhost while using XAMPP or WAMP or any other PHP servers in windows environment? well in that situation i think i can help you.In this article i am going to tell you how to send e-mail from localhost in PHP.

1) Open the “php.ini“. You should know where it is located because it depends upon the particular server you’re running.
2) Search for the attribute called “SMTP” in the php.ini file.Generally you can find the line “SMTP=localhost“. change the localhost to the smtp server name of your ISP. And, there is another attribute called “smtp_port” which should be set to 25.I’ve set the following values in my php.ini file.

SMTP = smtp.wlink.com.np
smtp_port = 25

3) Restart the apache server so that PHP modules and attributes will be reloaded.
4) Now try to send the mail using the mail() function ,

mail(“you@yourdomain.com”,”test subject”,”test body”);

you might get the warning like this,
Warning: mail() [function.mail]: “sendmail_from” not set in php.ini or custom “From:” header missing in C:\Program Files\xampp\htdocs\testmail.php on line 1
5) Now specify the following headers and try to send the mail again,

$headers = ‘MIME-Version: 1.0′ . “\r\n”;$headers .= ‘Content-type: text/html; charset=iso-8859-1′ . “\r\n”;$headers .= ‘From: sender@sender.com’ . “\r\n”;mail(“you@yourdomain.com”,”test subject”,”test body”,$headers);

Well that’s all, the mail is sent to “you@yourdomain.com” from the localhost.
Note : Some smtp server verifies the email address of the sender so the email address which is in the place of “sender@sender.com” should be a valid and existing email address otherwise mail might not be sent to the “you@yourdomain.com”.

Retrieve Your Gmail Emails Using PHP and IMAP

Written By Unknown on Senin, 24 Mei 2010 | 22.26

Grabbing emails from your Gmail account using PHP is probably easier than you think. Armed with PHP and its IMAP extension, you can retrieve emails from your Gmail account in no time! Just for fun, I’ll be using the MooTools Fx.Accordion plugin to display each email.



The CSS


div.toggler { border:1px solid #ccc; background:url(gmail2.jpg) 10px 12px #eee no-repeat; cursor:pointer; padding:10px 32px; }
div.toggler .subject { font-weight:bold; }
div.read { color:#666; }
div.toggler .from, div.toggler .date { font-style:italic; font-size:11px; }
div.body { padding:10px 20px; }

The MooTools JavaScript


window.addEvent('domready',function() {
var togglers = $$('div.toggler');
if(togglers.length) var gmail = new Fx.Accordion(togglers,$$('div.body'));
togglers.addEvent('click',function() { this.addClass('read').removeClass('unread'); });
togglers[0].fireEvent('click'); //first one starts out read
});

Some simple accordion code.

The PHP


/* connect to gmail */
$hostname = '{imap.gmail.com:993/imap/ssl}INBOX';
$username = 'yourname@gmail.com';
$password = '***********';

/* try to connect */
$inbox = imap_open($hostname,$username,$password) or die('Cannot connect to Gmail: ' . imap_last_error());

/* grab emails */
$emails = imap_search($inbox,'ALL');

/* if emails are returned, cycle through each... */
if($emails) {
/* begin output var */
$output = '';
/* put the newest emails on top */
rsort($emails);
/* for every email... */
foreach($emails as $email_number) {
/* get information specific to this email */
$overview = imap_fetch_overview($inbox,$email_number,0);
$message = imap_fetchbody($inbox,$email_number,2);
/* output the email header information */
$output.= '<div class="toggler '.($overview[0]->seen ? 'read' : 'unread').'">';
$output.= '<span class="subject">'.$overview[0]->subject.'</span> ';
$output.= '<span class="from">'.$overview[0]->from.'</span>';
$output.= '<span class="date">on '.$overview[0]->date.'</span>';
$output.= '</div>';
/* output the email body */
$output.= '<div class="body">'.$message.'</div>';
}
echo $output;
} 

/* close the connection */
imap_close($inbox);


With our individual username/password settings set, we connect to Gmail. Once connected, we request all emails. If we find emails, I reverse sort the emails so that the newest emails appear on top. For every email we receive, I output the subject and message in MooTools Fx.Accordion format.


 
Support : Creating Website | Johny Template | Mas Template
Copyright © 2011. Kumpulan Kata Broadcast Blackberry - All Rights Reserved
Template Created by Creating Website Published by Mas Template
Proudly powered by Blogger