Jump to content

Search the Community

Showing results for tags 'swiftmailer many email post'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Welcome to PHP Freaks
    • Announcements
    • Introductions
  • PHP Coding
    • PHP Coding Help
    • Regex Help
    • Third Party Scripts
    • FAQ/Code Snippet Repository
  • SQL / Database
    • MySQL Help
    • PostgreSQL
    • Microsoft SQL - MSSQL
    • Other RDBMS and SQL dialects
  • Client Side
    • HTML Help
    • CSS Help
    • Javascript Help
    • Other
  • Applications and Frameworks
    • Applications
    • Frameworks
    • Other Libraries
  • Web Server Administration
    • PHP Installation and Configuration
    • Linux
    • Apache HTTP Server
    • Microsoft IIS
    • Other Web Server Software
  • Other
    • Application Design
    • Other Programming Languages
    • Editor Help (PhpStorm, VS Code, etc)
    • Website Critique
    • Beta Test Your Stuff!
  • Freelance, Contracts, Employment, etc.
    • Services Offered
    • Job Offerings
  • General Discussion
    • PHPFreaks.com Website Feedback
    • Miscellaneous

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Age


Donation Link

Found 1 result

  1. I want to create in html textbox named b and php code which gets email from it with $_POST. Unfortunately as setBcc is used as an array and I cannot convince php to get emails from this textbox. This is the code of php: [code] <?php require_once 'lib/swift_required.php'; $transport = Swift_MailTransport::newInstance(); $message = Swift_Message::newInstance(); $message->setTo(array( "manlaughin@interia.pl" => "Nightbitch" )); $message->setBcc(array('email1@gmail.com', 'email2.gmail.com', 'email3@gmail.com')); $tekst = 'OK'; $message->setSubject("Funkcjonalnoƛci: 3 kategorie, zasady komentarzy"); $message->setBody($tekst,'text/html'); $message->setFrom("no-reply@admin.allegro.pl", "Allegro.pl"); // Send the email $mailer = Swift_Mailer::newInstance($transport); $mailer->send($message);[/code] and this is the line I want to setup with $_POST: [code] $message->setBcc(array('email1@gmail.com', 'email2.gmail.com', 'email3@gmail.com'));[/code] Of course I paste email in the textbox with all necessary letters like inside the array. All I have is this error after replacing emails in an array with $_POST: [code] Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in /home/a7018175/public_html/mail2.php on line 10[/code] I was using mail() function earlier, but it didn't send alot of emails to my newsletter users ... so I decided to switch to this class. Any idea how to $_POST emails from textarea in my case, so that swiftmailer could send message to all? I storage emails as Bcc field instead of always uploading changed file with new emails? $message->setBcc(array('email1@gmail.com', 'email2.gmail.com', 'email3@gmail.com'));[/code] Thanks alot. This is the first time I learn php, something I couldn't have done without you.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.