Showing posts with label gmail. Show all posts
Showing posts with label gmail. Show all posts

Saturday, October 1, 2011

Remove the "Invite a friend" box from GMail

The "Invite a friend" box to invite someone to use GMail is there since the inception of GMail in 2004. At that time, the GMail was only available to invited people. The people, who are already using GMail, were only able to invite other e-mail users to GMail. A GMail user was able to send 50 invites. And after using the 50 invites, another 50 invites get available to the user within minutes or hours.

Here is how the "Invite a friend" box looks:

But now GMail is open to all, anybody can register for GMail directly. So the "Invite a friend" is almost useless. Whenever I look at it, it annoys me, irritates me.

But, unfortunately, there is no way provided in GMail settings to remove the "Invite a friend" box. There is no GMail Labs feature available, as of my knowledge and when writing this, providing any option to remove it.

Solution
So I searched on Internet. On a blog, I found someone saying the way to remove this irritating thing using the Adblock Plus (ABP), a well-known Mozilla Firefox and Microsoft Internet Explorer add-on/extension. It is also available for Google Chrome but it in beta stage and not working good enough; also it is not possible to hide the "Invite a friend" box with ABP in Google Chrome.

Another way to remove it is using the GreaseMonkey add-on and use any of the script found at : http://userscripts.org/scripts/search?q=Gmail+Invite+a+Friend.

I will show here the steps to use the Adblock Plus add-on on Firefox to hide the "Invite a friend" box: First of all, open Firefox , go to Adblock Plus website and click on the "Install Adblock Plus" button. Restart Firefox. You should see a button of Adblock Plus somewhere in toolbar. Log into your GMail account. Ensure that the "Invite a friend" box is collapse, as shown in the first image, above. Then follow the following steps:
  1. Click on the Adblock Plus button on the toolbar.
  2. A menu will appear.
    Click on the "Select an element to hide" option from the menu.
  3. A panel will appear at left side displaying some shortcuts to use for selecting proper element.
    Wherever you hover the mouse pointer, the current element will be highlighted with a thick red outline/border.
    Hover mouse pointer over the "Invite a friend" box.

    When you see the "Invite a friend" highlighted AND "div, id: :rc, class: py pr" is shown like a tooltip below it, you should click.
    The tooltip is showing currently-highlighted element's name, id and class. Match your screen with the below image. The "div, id: :rc" is important in the tooltip, other things aren't.
  4. A dialog box will appear.
    Ensure these three things :
    1. "Element hiding rule" is "mail.google.com###\:rc". (The following 2 things are not need to be confirmed if this is correct, because this is based on the below two options.)
    2. "mail.google.com" is selected in the "Bind to domain" group box.
    3. ":rc" is written in the textbox of "id:" and its checkbox is checked.
    After confirming these things, click on the "Add element hiding rule" button in the dialog box.
Now the "Invite a friend" box will not appear.
 

Wednesday, August 10, 2011

Send Email using WAMP Server

This article is also available at http://blog.techwheels.net/send-email-using-wamp-server/. Please visit it for the latest updates on this article.

When building professional web applications, it is very necessary to test email functionality before deploying the website. It is therefore a requirement for web developers to send emails from their development machine during development process.

Solution
After tweaking with the Apache and PHP's INIs, I succeeded in sending email from my WAMP server.

So, to use PHP Mailer with GMail, ensure the following:
  • IMAP Access is enabled in your GMail's Settings -> Forwarding and POP/IMAP -> IMAP Access:


  • "ssl_module" module in Apache server is enabled:


  • "php_openssl", "php_smtp" and "php_sockets" extensions for PHP compiler are enabled:

I used the following code in PHP file:

require 'class.phpmailer.php';
$mail = new PHPMailer();
$mail->PluginDir = './PHPMailer_5.2.0'; // relative path to the folder where PHPMailer's files are located
$mail->IsSMTP();
$mail->Port = 465;
$mail->Host = 'smtp.gmail.com'; // "ssl://smtp.gmail.com" didn't worked
$mail->IsHTML(true); // if you are going to send HTML formatted emails
$mail->Mailer = 'smtp';
$mail->SMTPSecure = 'ssl';

$mail->SMTPAuth = true;
$mail->Username = "your_gmail_user_name@gmail.com";
$mail->Password = "your_gmail_password";

$mail->SingleTo = true; // if you want to send mail to the users individually so that no recipients can see that who has got the same email.

$mail->From = "your_gmail_user_name@gmail.com";
$mail->FromName = "Your Name";

$mail->addAddress("user.1@yahoo.com","User 1");
$mail->addAddress("user.2@gmail.com","User 2");

$mail->addCC("user.3@ymail.com","User 3");
$mail->addBCC("user.4@in.com","User 4");

$mail->Subject = "Testing PHP Mailer with localhost";
$mail->Body = "Hi,<br /><br />This system is working perfectly.";

if(!$mail->Send())
    echo "Message was not sent <br />PHP Mailer Error: " . $mail->ErrorInfo;
else
    echo "Message has been sent";


To use PHP Mailer on actual online server, you will need to change some of the configurations of PHP Mailer as described on the cPanel like control panel on your actual online server. These configurations would be:
  • $mail->Port
  • $mail->Host
  • $mail->Mailer
  • $mail->SMTPSecure
  • $mail->Username
  • $mail->Password
  • $mail->From
  • $mail->FromName