Yii Framework Forum: sending mail for other domains - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

sending mail for other domains Rate Topic: -----

#1 User is offline   basva 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 23
  • Joined: 19-August 09

Posted 19 February 2010 - 12:03 AM

Hi,

I am creating something that will be used by organizations to let people make reservations. There are invoice reminders and stuff and now I want to implement something like mass mailing to all people who made a reservation. I set the "from" address to their email, but I am not sure if that is a good thing to do.

Can I get away with this or should I use my own domain (which has everything set up correctly (MX, SPF) as the "from" and their address as the "reply-to"? Or is their another way?

Just want to be sure all messages get delivered but people will not start replying to me...

Thanks for any help,
Bas
0

#2 User is offline   Y!! 

  • Advanced Member
  • Yii
  • Group: Yii Dev Team
  • Posts: 978
  • Joined: 18-June 09

Posted 19 February 2010 - 01:55 AM

Yes you should setup your own domain with DNS and so on. I guess otherwise you run into trouble.
0

#3 User is offline   Mike 

  • Elite Member
  • PipPipPipPipPip
  • Yii
  • Group: Members
  • Posts: 3,016
  • Joined: 06-October 08
  • Location:Upper Palatinate

Posted 19 February 2010 - 05:22 AM

It's perfectly fine to set a custom From header in sent emails. No need to set up anything in DNS as your user's email address should already work.

Edit: The only problem i could think of is that your SMTP server does some rewriting. Like only allowing local mail domains in the From header.

This post has been edited by Mike: 19 February 2010 - 05:24 AM

0

#4 User is offline   basva 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 23
  • Joined: 19-August 09

Posted 19 February 2010 - 05:31 AM

Thanks for the replies.

I think what you say is true Mike, because I opened one of the emails sent by an organization in raw source and saw:

Received: from server.mydomain.com
Return-Path: apache@server.mydomain.com
Received-SPF: pass

Looks good to me also...

Thanks,
Bas
0

#5 User is offline   Mike 

  • Elite Member
  • PipPipPipPipPip
  • Yii
  • Group: Members
  • Posts: 3,016
  • Joined: 06-October 08
  • Location:Upper Palatinate

Posted 19 February 2010 - 05:35 AM

Right. Changing the Return-Path is another issue. Many SMTP server don't allow that. For sendmail you have to e.g. add the user under which the webserver is running to trusted-users.
0

#6 User is offline   basva 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 23
  • Joined: 19-August 09

Posted 19 February 2010 - 06:20 AM

I was thinking about that. Changing it to something which I monitor. Thing is that I use Google Apps to host my mail. i am not sure what would happen if the return path is set to a user/alias over there (like maillog@mydomain.com)

Makes me think about another issue I have. In my site users need to verify their email address. Someone created an account with blabla@homail.com (so a missing 't' in the hotmail), so this verification mail never arrived, resulting in a lot of confusing communication.

I know you can set an option in CEmailValidator to check the MX records, but I read somewhere that it is not necessary for mailservers to have this set. Is this true? If so, is there another way of checking whether the email address entered is pointing to a real mailserver?
0

#7 User is offline   Mike 

  • Elite Member
  • PipPipPipPipPip
  • Yii
  • Group: Members
  • Posts: 3,016
  • Joined: 06-October 08
  • Location:Upper Palatinate

Posted 19 February 2010 - 06:31 AM

View Postbasva, on 19 February 2010 - 06:20 AM, said:

I know you can set an option in CEmailValidator to check the MX records, but I read somewhere that it is not necessary for mailservers to have this set. Is this true? If so, is there another way of checking whether the email address entered is pointing to a real mailserver?


Short answer: No. That's why sending validation emails is still the method of choice to make sure, an email is correct. You can of course check, wether there's a mailserver for a domain. But that doesn't tell you much.
0

#8 User is offline   basva 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 23
  • Joined: 19-August 09

Posted 19 February 2010 - 06:33 AM

Thanks. Have to create a nice FAQ then :)
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users