Lunarpages Web Hosting Forum

Author Topic: Use php to send file as attachment with phpList  (Read 3558 times)

124256

  • Guest
Use php to send file as attachment with phpList
« on: September 10, 2006, 01:04:55 PM »
My site has a quarterly newsletter it sends out and a phpList mailing list users subscribe to. The newsletter itself is sent as a pdf attachment. I also have a little script where our newsletter writer can upload the newsletter herself and a link to it gets created on the site. However, I still have to go into phpList and send the newsletter out manually. I was wondering if I could make this process seamless with a script that I could call once the file is uploaded and have phpList send an email where the just-uploaded file is an attachment.

Offline JeremyD

  • SleePy...
  • Jabba the Hutt
  • *****
  • Posts: 733
  • SMF Team Member
    • LcT Tribe
Re: Use php to send file as attachment with phpList
« Reply #1 on: September 10, 2006, 06:50:55 PM »
can the people who upload the file also send the mail? If that is possible then you just need to include a link to the page you send the mail..
Otherwise you can have it include the php file that sends the mail and have it mail it..

124256

  • Guest
Re: Use php to send file as attachment with phpList
« Reply #2 on: September 12, 2006, 05:04:58 PM »
I'd rather automate it as much as possible. The file(s) that send the mail are actually quite complex so I was hoping someone here would be somewhat familiar with phplist's code. I would post on their forums but those are down. I was hoping there was a way for it to basically fill our the attachment, message, and what-list-to-send-to parts for me based on some things in a database of mine. I'm sure this has been done before. Anyone know the relevant variable and how I can do this so that all the right authentication and info that would have come from a previous page stays valid?