This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

E-mail without sender
#1
Hi,
LM 5 sends (from a script) E-mails with some data (attached files) correctly - using the mailattach function.
The only problem is, that the e-mails are sent "without" the sender identification in their header... So they arrive - are displayed according to the addresse's client as e-mails from nobody@nobody.nobody or with "no name sender" etc...

In common functions (function: mailattach.... local settings = {  ..... ) from is stated as string constant in format  (from = 'xyzy@smpt.cz',).
Smtp server/user/password entered in the identical way are "accepted" )
Any idea, what setting is missing/wrong...?

Thanks Daniel
Reply
#2
The code in the example was incorrect. From header must be placed together with to and subject:
Code:
settings.source = smtp.message({
  headers = {
      to = table.concat(to, ', '),
      subject = subject,
      From = '<' .. tostring(settings.from) .. '>',
    },
...

If needed, you can add a name before < in the header so it's displayed together with the email address.
Reply
#3
Thanks a lot.
Daniel
Reply


Forum Jump: