Completely newbie to scripting !! :
I would like to get the subject out of a mail message and put this in a seperate string:
mailMsg = mail.retr(i)[1]
example result of mailMsg is :
['Return-Path: <Louisette.Snoe kx@123.com>', 'Delivered-To: 3-marc.jonkers@45 6.com', 'From: "louisette snoekx" <Louisette.Snoe kx@123.com>', 'To: <marc.jonkers@4 56.com>', 'References: <20060919215507 .cvi40klhf1q888 4k@webmail.456. com>', 'Subject: Gelezen: workshop 15/10 essen', 'Date: Sun, 5 Nov 2006 22:05:53 +0100', .. etc]
I would like the string subject(i) to contain in this example 'Gelezen: workshop 15/10 essen'
I suppose it must be something like
for line in mailMsg:
if line.find('Subj ect:')
and then ???
I would like to get the subject out of a mail message and put this in a seperate string:
mailMsg = mail.retr(i)[1]
example result of mailMsg is :
['Return-Path: <Louisette.Snoe kx@123.com>', 'Delivered-To: 3-marc.jonkers@45 6.com', 'From: "louisette snoekx" <Louisette.Snoe kx@123.com>', 'To: <marc.jonkers@4 56.com>', 'References: <20060919215507 .cvi40klhf1q888 4k@webmail.456. com>', 'Subject: Gelezen: workshop 15/10 essen', 'Date: Sun, 5 Nov 2006 22:05:53 +0100', .. etc]
I would like the string subject(i) to contain in this example 'Gelezen: workshop 15/10 essen'
I suppose it must be something like
for line in mailMsg:
if line.find('Subj ect:')
and then ???
Comment