Send Mail to gmail account with perl Installation of Send::SMTP::Gmail: In order to send mail via Gmail, you need to have TLS verification. Having TLS and Installation of perl package Send::SMTP::Gmail is covered in brief. For Ubuntu: sudo apt-get install openssl libnet-ssleay-perl libcrypt-ssleay-perl For RedHat/Fedora/CentOs: yum install perl-IO-Socket-SSL perl-Digest-HMAC perl-TermReadKey perl-MIME-Lite perl-File-LibMagic perl-IO-Socket-INET6 perl-Net-SSLeay perl-Crypt-SSLeay perl-Email-Send Usages: Following method is used to send mail and attachment in it. Please read it and post your comments. sub sendMail { use Email::Send::SMTP::Gmail; my $to=shift; my $cc=shift; my $subject=shift; my $body=shift; ...
Change MySQL user's password in bulk Sometimes we need to change the password of mysql users at bulk. Lets say your company has fired a group of peoples or dissolved a project. This requirement can be supplied as : We can achieve the same by changing the password field in mysql.user table. Password() is a predifined method in mysql which generates encrypted value of a certain string. host update mysql.user set password = PASSWORD("passwd") where host IN (<Comma separated list of HostName/IP>); user update mysql.user set password = PASSWORD("passwd") where user IN (<Comma separated list of ‘user’@’host’>);