Em Andamento

Unix job: mysql query to smtp post

Hello,

I have MySQL database with an email table (structure below). I want a unix script that I can run as background job that will do the following:

1) Connect to MySQL database

2) Select all "toProcess" email records

3) Connect to SMTP server

4) send emails

5) update MYSQL database with correct status from smtp process, either status processed or error

6) sleep for a bit, and then start again

MySQL database settings, smtp connection settings (including port number) should all be paramterised.

Fully tested and working script please.

Thanks

Michael

CREATE TABLE `emails` (

`id` INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY ,

`from` TINYTEXT NOT NULL ,

`to` TINYTEXT NOT NULL ,

`subject` TINYTEXT NOT NULL ,

`body` TEXT NOT NULL ,

`status` TINYINT UNSIGNED NOT NULL ,

`created` DATETIME NOT NULL

) ENGINE = MYISAM COMMENT = '0=exists,1=toProcess,2=processing,3=processed,4=error,5=permanentError';

Habilidades: Linux, Perl

Ver mais: smtp mysql query, primary job, michael query, job id, int i, i job, c# job, cgi job, run mysql query send emails unix, query mysql database unix script, mysql unix query, cron query update mysql linux, unix project smtp, post mysql query, query status mysql bash, perl crontab unix, unix freelance job, crontab mysql query, mysql unix scripts, unix script connect mysql, perl mysql query results email, perl mysql query sleep error, unix script select email table, mysql unix script, script find smtp record

Acerca do Empregador:
( 116 comentários ) London, United Kingdom

ID do Projeto: #145945

Premiar a:

arikaterin

I can do it on Perl, PHP or Bash.

$30 USD em 1 dia
(8 Avaliações)
3.2

7 freelancers estão ofertando em média $59 para este trabalho

dims

Can write script. But need run via crontab

$100 USD in 5 dias
(100 Comentários)
5.9
gangabass

Hi, i can make this script for you. I have 6+ years of experience in Perl and work with MySQL as well.

$70 USD in 2 dias
(142 Comentários)
5.9
hameedkhan

more details in PMB.

$50 USD in 5 dias
(66 Comentários)
5.8
Spin

We will doing all that you want (and more... :-))). Quickly, Professional, Quality - our answer you and your organization. We work more than 5 years. The group of our programmers is ready to begin your project. We not Mais

$90 USD in 4 dias
(2 Comentários)
2.4
bendriss

Hello; Your need is clear, i can help you, plz see pm

$40 USD em 1 dia
(1 Comentário)
1.0
droot

I can do it on Perl or C/C++.

$30 USD em 1 dia
(0 Comentários)
0.0