Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email

Magento Forum

[Help] Import eMailadresses
Total Posts:  32
Joined:  2009-01-12

Hello, i have a problem to import email adresses. I found in a old Topic the following code

require_once "app/Mage.php";

if( isset(
$_POST['submit']) ){

if ($_POST['code'== 'divinegal12'){


        foreach ( 
$emails as $email ){

else {

<form action="" method="post">
Email: <textarea  name="email"rows="4" cols="60"> </textarea><input type="submit" name="submit" value="Submit" size="60" /><br/>
Code: <input type="text" name="code" value="<?php echo isset($_POST['code']) ? $_POST['code'] : ''; ?>"/>

Now is the problem ... by submit the mail adresses the script shows the error massage:

Fatal error: Uncaught exception ‘Exception’ with message ‘Warning: session_start() [<a href=’function.session-start’>function.session-start</a>]: Cannot send session cookie - headers already sent by (output started at /is/htdocs/wp1157649_YLDVUUQNV5/www/mail_adder.php:1) in /is/htdocs/wp1157649_YLDVUUQNV5/www/app/code/core/Mage/Core/Model/Session/Abstract/Varien.php on line 99’ in /is/htdocs/wp1157649_YLDVUUQNV5/www/app/code/core/Mage/Core/functions.php:239 Stack trace: #0 /is/htdocs/wp1157649_YLDVUUQNV5/www/app/code/core/Mage/Core/Model/Session/Abstract/Varien.php(99): mageCoreErrorHandler(2, ‘session_start()...’, ‘/is/htdocs/wp11...’, 99, Array) #1 /is/htdocs/wp1157649_YLDVUUQNV5/www/app/code/core/Mage/Core/Model/Session/Abstract/Varien.php(154): Mage_Core_Model_Session_Abstract_Varien->start() #2 /is/htdocs/wp1157649_YLDVUUQNV5/www/app/code/core/Mage/Core/Model/Session/Abstract.php(83): Mage_Core_Model_Session_Abstract_Varien->init(NULL) #3 /is/htdocs/wp1157649_YLDVUUQNV5/www/app/code/core/Mage/Customer/Model/Session. in /is/htdocs/wp1157649_YLDVUUQNV5/www/app/code/core/Mage/Core/functions.php on line 239

I hope someone can help me


Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top