Suoritettu

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';

Taidot: Linux, Perl

Näytä lisää: 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

Tietoa työnantajasta:
( 116 arvostelua ) London, United Kingdom

Projektin tunnus: #145945

Myönnetty käyttäjälle:

arikaterin

I can do it on Perl, PHP or Bash.

$30 USD 1 päivässä
(8 Arvostelua)
3.2

7 freelanceria on tarjonnut keskimäärin %project_bid_stats_avg_sub_26% %project_currencyDetails_sign_sub_27% tähän työhön

dims

Can write script. But need run via crontab

$100 USD 5 päivässä
(100 arvostelua)
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 2 päivässä
(142 arvostelua)
5.9
hameedkhan

more details in PMB.

$50 USD 5 päivässä
(66 arvostelua)
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 Lisää

$90 USD 4 päivässä
(2 arvostelua)
2.4
bendriss

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

$40 USD 1 päivässä
(1 arvostelu)
1.0
droot

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

$30 USD 1 päivässä
(0 arvostelua)
0.0