In progress but not yet perfect...
Below the script's code I wrote, it's based on the Pete's code.
Like you can see I changed of way for obtain a border=0.
I choosed to include this supplementary line in the style definition area: img{border:none;}
Like that, no necessity to scan the message's body to find <img/> tag(s), all linked image will be displayed without border.
I know this code is a makeshift job, but you are welcome for optimize it.
It's running if you: put your message in the Out mailbox, you manually call the script and you send your queuing message(s).
But I can't make it work automaticaly (called by a filter).
I don't know, if script don't run in this case or if Barca "recheck" the html code after the script working before sending.
If someone have an idea...
Thanks
- Code: Select all
Set $OnErrorMessage ""
AddStrings $OnErrorMessage "Error in " $pocoScriptName
Set $OnErrorGoTo "POCO_ERROR"
If #pocoScriptMode = 2 Then BEGIN
If #pocoScriptMode = 5 Then BEGIN
Goto DONE
:BEGIN
SuggestUsage 2
ReadRawBody $rawBody %message
:BODY_SECTION
Set $headSection $rawBody
Set $styleSection $rawBody
StringPos #index "<!--" $rawBody
ChopString $styleSection #index 4
InsertString $styleSection #index "<!-- \nimg{border:none;}"
:SAVE
Set $rawBody ""
AddStrings $rawBody $styleSection
AssignStyledBody %message $rawBody
If #pocoScriptMode ! 5 Then DONE
SaveMessage %message $currentMailbox
DeleteMessage %message
:DONE
Exit
:POCO_ERROR
Exit