Page 1 of 2 12 LastLast
Results 1 to 10 of 14
  1. #1
    Join Date
    Jul 2005
    Location
    Orlando, Fl
    Posts
    345
    Plugin Contributions
    0

    help question Change From Address for Newsletter

    Hi, I need to change the email address my news letter comes from. All my store emails come from [email protected] but the newsletter we want to come from [email protected]. I found this in the newsletter module here around line 102:

    zen_mail($audience->fields['customers_firstname'] . ' ' . $audience->fields['customers_lastname'], $audience->fields['customers_email_address'], $this->title, $this->content, STORE_NAME, EMAIL_FROM, $html_msg, 'newsletters');

    and changed to this:

    $newsemail = '[email protected]';

    zen_mail($audience->fields['customers_firstname'] . ' ' . $audience->fields['customers_lastname'], $audience->fields['customers_email_address'], $this->title, $this->content, STORE_NAME, $newsemail, $html_msg, 'newsletters');


    essentially changing the EMAIL_FROM to $newsemail or '[email protected]'

    but it still sends from [email protected]

    How can I make this method work?

    Thanks in Advance

    DD

  2. #2
    Join Date
    Jan 2004
    Posts
    66,449
    Plugin Contributions
    81

    Default Re: Change From Address for Newsletter

    If your Admin->Configuration->Email Options->Send from known domain is set to true, then the EMAIL_FROM will be used regardless. Some servers require that be set to True or emails won't send at all since it looks like emails are being spoofed/impersonated.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  3. #3
    Join Date
    Jul 2005
    Location
    Orlando, Fl
    Posts
    345
    Plugin Contributions
    0

    help question Re: Change From Address for Newsletter

    Ok, that worked I changed known email to no and then used the change I specified in my last post. I just need to set the reply address to the same, it is currently defaulting to the EMAIL_FROM address.

    Not sure where to assign this in here:

    zen_mail($audience->fields['customers_firstname'] . ' ' . $audience->fields['customers_lastname'], $audience->fields['customers_email_address'], $this->title, $this->content, STORE_NAME, $newsemail, $html_msg, 'newsletters');

    Thanks Again

  4. #4
    Join Date
    Jul 2005
    Location
    Orlando, Fl
    Posts
    345
    Plugin Contributions
    0

    help question Re: Change From Address for Newsletter

    Where can I specify a different:

    'Reply-To: [email protected]'

    using

    zen_mail()

    for a the newsletter.

    Thanks

    DD

  5. #5
    Join Date
    Jul 2005
    Location
    Orlando, Fl
    Posts
    345
    Plugin Contributions
    0

    help question Re: Change REPLY Address for Newsletter

    So i've been doing a bit of digging on where I can specify a different reply to address fo the newsletter and I feel like i traced it to here in 'functions email" :

    // set the reply-to address. If none set yet, then use Store's default email name/address.
    // If sending from contact-us or tell-a-friend page, use the supplied info
    $email_reply_to_address = ($email_reply_to_address) ? $email_reply_to_address : (in_array($module, array('contact_us', 'tell_a_friend')) ? $from_email_address : EMAIL_FROM);
    $email_reply_to_name = ($email_reply_to_name) ? $email_reply_to_name : (in_array($module, array('contact_us', 'tell_a_friend')) ? $from_email_name : STORE_NAME);
    $mail->AddReplyTo($email_reply_to_address, $email_reply_to_name);

    This says if none is set, use the default, which it is doing, but how do i set it. Looking at the function, it's not clear, at least to me, where that would be:

    zen_mail($to_name, $to_address, $email_subject, $email_text, $from_email_name, $from_email_address, $block=array(), $module='default', $attachments_list='' )

    Please Help TIA

    DD

  6. #6
    Join Date
    Jul 2005
    Location
    Orlando, Fl
    Posts
    345
    Plugin Contributions
    0

    Have a Drink SOLVED: Change From Address for Newsletter

    I added 'newsletters' to this ..array('contact_us', 'tell_a_friend', 'newsletters') .. in functions email :


    $email_reply_to_address = ($email_reply_to_address) ? $email_reply_to_address : (in_array($module, array('contact_us', 'tell_a_friend', 'newsletters')) ? $from_email_address : EMAIL_FROM);

    $email_reply_to_name = ($email_reply_to_name) ? $email_reply_to_name : (in_array($module, array('contact_us', 'tell_a_friend', 'newsletters')) ? $from_email_name : STORE_NAME);

    I'm assuming it works because i've already done what I specified in the previous posts.

    Thanks

  7. #7

    Default Re: SOLVED: Change From Address for Newsletter

    Quote Originally Posted by djdavedawson View Post
    I added 'newsletters' to this ..array('contact_us', 'tell_a_friend', 'newsletters') .. in functions email :


    $email_reply_to_address = ($email_reply_to_address) ? $email_reply_to_address : (in_array($module, array('contact_us', 'tell_a_friend', 'newsletters')) ? $from_email_address : EMAIL_FROM);

    $email_reply_to_name = ($email_reply_to_name) ? $email_reply_to_name : (in_array($module, array('contact_us', 'tell_a_friend', 'newsletters')) ? $from_email_name : STORE_NAME);
    I need add this for order emails to.

    what can i write for order emails?

  8. #8
    Join Date
    Jul 2005
    Location
    Orlando, Fl
    Posts
    345
    Plugin Contributions
    0

    help question Re: Change From Address for Newsletter

    Could you explain a little more what you are trying to do ?

    Thanks :)

    DD

  9. #9

    Default Re: Change From Address for Newsletter

    http://www.zen-cart.com/forum/showthread.php?t=138068

    there is the Problem described.
    No solution jet.

    I started to solve the Problem with changing the senders email adress to customers email Adress.

    I need the Mail Send from the email adress of the Customer, because the Customer orders things, and i reply with my Email-System to the Customer.

  10. #10

    Default Re: Change From Address for Newsletter

    to change the senders email to customers email it tried to changes in

    includes/functions/functions_email.php

    Code:
    $email_reply_to_address = ($email_reply_to_address) ? $email_reply_to_address : (in_array($module, array('contact_us',  'tell_a_friend')) ? $from_email_address : EMAIL_FROM);
    $email_reply_to_name    = ($email_reply_to_name)    ? $email_reply_to_name    : (in_array($module, array('contact_us',  'tell_a_friend')) ? $from_email_name    : STORE_NAME);
    and in includes/classes/orders.php row 1023

    Code:
    zen_mail('', SEND_EXTRA_ORDER_EMAILS_TO, SEND_EXTRA_NEW_ORDERS_EMAILS_TO_SUBJECT . ' ' . EMAIL_TEXT_SUBJECT . EMAIL_ORDER_NUMBER_SUBJECT . $zf_insert_id,
          $email_order . $extra_info['TEXT'], STORE_NAME, EMAIL_FROM, $html_msg, 'checkout_extra', $this->attachArray);
        }

    the copy of the email comes, because of the EMAIL_FROM , always from the Shops email. Not from the customers email.

    Until now, nobody including me , was able to change that.

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. Replies: 9
    Last Post: 7 May 2016, 06:39 PM
  2. v150 How do I change the site address from /foldername to /store
    By cadillac531 in forum Basic Configuration
    Replies: 3
    Last Post: 29 Oct 2012, 11:19 PM
  3. Shipping address from PayPal and not even ask for it from customer
    By dpinkus in forum Built-in Shipping and Payment Modules
    Replies: 2
    Last Post: 4 Nov 2010, 11:15 PM
  4. Change address from IP to URL?
    By atracksler in forum General Questions
    Replies: 1
    Last Post: 30 Nov 2006, 08:18 PM

Posting Permissions

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