Virus Software blocking .bmp's in email attachments
Jza
Member Posts: 24
Hey guys.
I have a problem with emailing of remittance advices - the company wants their logo in the .html file we email them. Good old outlook seperates the email into an .html part and a .bmp part which is the bitmap logo on the report.
Of course - some of their clients anti-virus software blocks the .bmp attachment and rejects the email.
The simple solution is to remove the logo - but the client insists its on the report.
Is there any way i can get round this?
Cheers,
James
I have a problem with emailing of remittance advices - the company wants their logo in the .html file we email them. Good old outlook seperates the email into an .html part and a .bmp part which is the bitmap logo on the report.
Of course - some of their clients anti-virus software blocks the .bmp attachment and rejects the email.
The simple solution is to remove the logo - but the client insists its on the report.
Is there any way i can get round this?
Cheers,
James
0
Comments
-
0
-
Ah.. i see - so it looks like i wont be able to do it with a few code tweaks... thanks!
James0 -
It's possible to insert a logo into the e-mail by using File -> Send -> Report using e-mail. I haven't quite figured out how outlook should be configured, but I have managed do get a logo into to the html-document. The trouble is that a colleague of mine cannot recreate this in his own outlook program.
Another problem using html-reporting would be the antivirus or antispam filter. Standard html-documents from Navision are not w3c-compliant. By it is possible to manipulate the html-code and inserting the missing parts: Meta-tag and language-definitions.
Streaming the html-file into a table with a integer key-field and a text=250-field. Then insert the missing parts and outstream back into a html-file. That should do the trick \:D/0 -
Feldballe wrote:It's possible to insert a logo into the e-mail by using File -> Send -> Report using e-mail. I haven't quite figured out how outlook should be configured, but I have managed do get a logo into to the html-document. The trouble is that a colleague of mine cannot recreate this in his own outlook program.
Another problem using html-reporting would be the antivirus or antispam filter. Standard html-documents from Navision are not w3c-compliant. By it is possible to manipulate the html-code and inserting the missing parts: Meta-tag and language-definitions.
Streaming the html-file into a table with a integer key-field and a text=250-field. Then insert the missing parts and outstream back into a html-file. That should do the trick \:D/
Wow.... dont suppose you have any example code :shock:0 -
Hello James,
I'm using two functions to extract html-code from the navision html-report file, then I clean it to remove those annoying page-sections and inserting missing code-parts.
After cleaning the code it will be returned to the original html-file.
This procedure doesn't take much time and I have experienced that the result will be accepted in very strong antispam and and antivirus filters.
CleanHTML(l_HTMLName : Text[250]) : Boolean
{
Variables:
Globals
tmptabel(rec. Comment Line) // In table Comment Line the description-field is extended to text=250
IntLine(Integer) // This is partly hardcoded. The Html-code in Navision reports allways have the same beginning.
Text50102 = <HR> // Pagesection-tags
Text50101 = META-tag definitions. Take a look at w3c-homepage
Text50100 = Default header with script-tag. Take a look at w3c-homepage to get some examples.
}
IF tmpTabel.FIND('-') THEN
tmpTabel.DELETEALL;
CLEAR(intLine);
HTMLFile.OPEN(l_HTMLName);
HTMLFile.CREATEINSTREAM(IsInstream);
WHILE NOT (IsInstream.EOS()) DO BEGIN
intCount := IsInstream.READTEXT(strContainer, 250);
intLine := intLine + 10;
IF STRPOS(strContainer, Text50102) <> 0 THEN BEGIN
strContainer := DELSTR(strContainer, STRPOS(strContainer, Text50102), STRLEN(Text50102));
END;
tmpTabel."Table Name" := 0;
tmpTabel."No." := '';
tmpTabel."Line No." := intLine;
tmpTabel.Comment := strContainer;
tmpTabel.INSERT;
END;
// Insert header into htmlfile
tmpTabel."Table Name" := 0;
tmpTabel."No." := '';
tmpTabel."Line No." := 1; // Hardcoded due to the fact that the file structure is allways the same
tmpTabel.Comment := Text50100;
tmpTabel.INSERT;
// Insert meta-tag into htmlfile
tmpTabel."Table Name" := 0;
tmpTabel."No." := '';
tmpTabel."Line No." := 31; // Hardcoded due to the fact that the file structure is allways the same
tmpTabel.Comment := Text50101;
tmpTabel.INSERT;
HTMLFile.CLOSE;
EXIT(ReCreateHTML(l_HTMLName));
ReCreateHTML(l_htmlName : Text[250]) : Boolean
IsCreate := HTMLFile.CREATE(l_htmlName);
HTMLFile.CREATEOUTSTREAM(IsOutstream);
IF tmpTabel.FIND('-') THEN BEGIN
REPEAT
IsOutstream.WRITETEXT(tmpTabel.Comment);
UNTIL tmpTabel.NEXT = 0;
END;
HTMLFile.CLOSE;
EXIT(IsCreate);
Note:
l_htmlName contains the saveashtml-filename. This filename should be consistent for every html-report. Make some function to define this filename before you run report.saveashtml.0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.7K Microsoft Dynamics NAV
- 18.8K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 328 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions