rejetto forum

Author Topic: Simple contact template  (Read 23234 times)

Offline dj

  • Tireless poster
  • ****
  • Posts: 291
  • 👣 🐾
    • View Profile
    • PWAs
Re: Simple contact template
« on: August 25, 2018, 06:33:49 PM »
@JavaScript Experts: in the EML version I use this unoptimized code:

Code: [Select]
var FullHeaders = Header0+Header1+Header2+Header3+Header4+Header5+Header6+Header7+Header8+Header9+Header10;
Is there a more efficient way of doing this in, using plain vanilla JavaScript? How we could make the variable 'FullHeaders' much shorter, concatenating the variables Header 0 to 10 (perhaps, using an loop array?). But how?... ???

Cheers,
Leo.-


simply write
Code: [Select]
var FullHeaders =
'Received: from '+LoggedInUser+' ('+LoggedUserIP+')'+'\n' +
'From: "'+GetName+'" <'+GetMail+'>'+'\n' +
'To: "HFS Server Administrator"'+'\n'
...

Follow members gave a thank to your post:


Thank-o-Matic 3.0 By Adk Team