Wednesday, November 28, 2007

Email::Send::SMTP::TLS

I wrote a new CPAN module Email::Send::SMTP::TLS.
it can use Gmail smtp.gmail.com to send email, and it runs well under Win32.

I tried Email::Send::Gmail, but it's not working in my computer at all.

example:

use Email::Send;

my $mailer = Email::Send->new( {
mailer => 'SMTP::TLS',
mailer_args => [
Host => 'smtp.gmail.com',
Port => 587,
User => 'username@gmail.com',
Password => 'password',
Hello => 'fayland.org',
]
} );

use Email::Simple::Creator; # or other Email::
my $email = Email::Simple->create(
header => [
From => 'username@gmail.com',
To => 'to@mail.com',
Subject => 'Subject title',
],
body => 'Content.',
);

eval { $mailer->send($email) };
die "Error sending email: $@" if $@;

Labels:

Monday, November 26, 2007

hosting git project in http://repo.or.cz/

http://repo.or.cz/ is a free git hosting site.

* register user: http://repo.or.cz/m/reguser.cgi
if u don't have a cat ~/.ssh/id_rsa.pub yet. use "ssh-keygen -t rsa"
* register project: http://repo.or.cz/m/regproj.cgi
* edit project, add yourself as a user.
* create a local git dir
> mkdir fayland-git
> cd fayland-git
> git init-db
> vim README
> git add .
> export GIT_AUTHOR_NAME="Fayland Lam"
> export GIT_COMMITTER_NAME="Fayland Lam"
> git commit
* at last
> git push git+ssh://repo.or.cz/srv/git/fayland.git master

that's it.

Labels:

Wednesday, November 07, 2007

three books