SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Guru laflair13's Avatar
    Join Date
    Nov 2004
    Location
    TN
    Posts
    629
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Newsletter sending from Unknown????

    Hey all,

    I tried to send out a newsletter and it keeps saying its coming from Unknown Sender. Theres nowhere in the admin section to edit newsletter option.

    Here is what the code looks like.

    Code:
    function send($send){
    
    if(!$send[subject]){
    $mes=" (You must enter a subject)";
    newsletter($mes);
    exit;
    }
    
    if(!$send[body]){
    $mes=" (You must enter an email)";
    newsletter($mes);
    exit;
    }
    
    if ($emailq = mysql_query("SELECT name,email FROM members")) {
      if (mysql_num_rows($emailq)) {  
        while(list($name,$email)=mysql_fetch_row($emailq)){
    
    mail("$name <{$email}>",$send['subject'],$send['body'], "From: {$_SESSION['aname']} <{$config['sitemail']}>\nReply-To: {$name} <{$config['sitemail']}>\nContent-type: text/plain\nX-Mailer: PHP/" . phpversion());
    
          $sent.="Sending To $name..........Sent<br />";
        }
      }
    }
    
    $adminlog[admin]="{$_SESSION['aname']}";
    $adminlog[details]="[Sent Newsletter] Subject: $send[subject]";
    adminlog($adminlog);
    Any advice on what I can edit to change this?
    Thanks In Advance

    David

  2. #2
    SitePoint Enthusiast anhblog.net's Avatar
    Join Date
    May 2009
    Posts
    30
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You can try to put a name before youremail ( admin email )

    Like : News <admin@admin.com>

    In :

    mail("$name <{$email}>",$send['subject'],$send['body'], "From: {$_SESSION['aname']} <{$config['sitemail']}>\nReply-To: {$name} <{$config['sitemail']}>\nContent-type: text/plain\nX-Mailer: PHP/" . phpversion());
    Replace by :

    mail("$name <{$email}>",$send['subject'],$send['body'], "From: News <{$config['sitemail']}>\nReply-To: {$name} <{$config['sitemail']}>\nContent-type: text/plain\nX-Mailer: PHP/" . phpversion());
    Blogger and Tips - Make a Blog - SEO Tips - Technogoly News

    Getting 1,000 quality backlinks with just $29.99 at here

  3. #3
    SitePoint Guru laflair13's Avatar
    Join Date
    Nov 2004
    Location
    TN
    Posts
    629
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for the heads up. Will try that tomorrow, Dont want to send to many newsletters..
    Thanks In Advance

    David

  4. #4
    SitePoint Guru laflair13's Avatar
    Join Date
    Nov 2004
    Location
    TN
    Posts
    629
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Didnt work, I got a


    Parse error: syntax error, unexpected T_LNUMBER
    Thanks In Advance

    David


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •