Incorrect ERPNext hosting links in sent emails

Hi,

I am hosting the newest instance of frappe bench on digital ocean (which is working GREAT by the way, kudos to Frappe team). All of the emails are correctly sent from the install. However, every email has a link that refers back to www.erpnext.com/**** as if it was hosted there. I assumed these email templates would be found in the form customizations, but I couldn't find them. Where are they? In the templates/email/newuser.html found on github here:

https://github.com/frappe/frappe/blob/1804f7133d889245bfdec1d04ed10e62ff8b2ee3/frappe/templates/emails/new_user.html

It just states

{{ link }}

But no actual links. Where can I redefine that variable to point to the right place? Would the change survive an update?

Note: I am not talking about the "powered by ERPNext" links, these links are different.

Example: I create a new user in erpnext. That user receives an invitation with a login id and a link to log in. That is the link that goes to an invalid http://erpnext.com/*** URL. Obviously I would like to add users and have them go to the correct link to log in.

How do I correct those links found in all emails? Please advise.

Thanks,

fbdystang



Note:

 

If you are posting an issue,

  1. We should be able to replicate it at our end. So please give us as much information as you can. Please see it from the point of view of the person receiving the communication.
  2. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
  3. For sending images, use http://imgur.com or other similar services. Do not send images as attachments. Links are good. Same goes for any file you are going to send.

     

    End of Note



    You received this message because you are subscribed to the Google Groups "ERPNext Developer Forum" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un…@googlegroups.com.

    To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/de5300db-fa43-4ccb-a1bd-e3b32c855fe8%40googlegroups.com.

    For more options, visit https://groups.google.com/d/optout.
This is how the domain for the link is determined:

https://github.com/frappe/frappe/blob/1804f7133d889245bfdec1d04ed10e62ff8b2ee3/frappe/utils/__init__.py#L801



On 09-Jul-2014, at 3:29 am, 'fbdystang' via ERPNext Developer Forum <er...@googlegroups.com> wrote:

Hi,

I am hosting the newest instance of frappe bench on digital ocean (which is working GREAT by the way, kudos to Frappe team). All of the emails are correctly sent from the install. However, every email has a link that refers back to www.erpnext.com/**** as if it was hosted there. I assumed these email templates would be found in the form customizations, but I couldn't find them. Where are they? In the templates/email/newuser.html found on github here:

https://github.com/frappe/frappe/blob/1804f7133d889245bfdec1d04ed10e62ff8b2ee3/frappe/templates/emails/new_user.html

It just states

{{ link }}

But no actual links. Where can I redefine that variable to point to the right place? Would the change survive an update?

Note: I am not talking about the "powered by ERPNext" links, these links are different.

Example: I create a new user in erpnext. That user receives an invitation with a login id and a link to log in. That is the link that goes to an invalid http://erpnext.com/*** URL. Obviously I would like to add users and have them go to the correct link to log in.

How do I correct those links found in all emails? Please advise.

Thanks,

fbdystang



Note:

 

If you are posting an issue,

  1. We should be able to replicate it at our end. So please give us as much information as you can. Please see it from the point of view of the person receiving the communication.
  2. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
  3. For sending images, use http://imgur.com or other similar services. Do not send images as attachments. Links are good. Same goes for any file you are going to send.

     

    End of Note



    You received this message because you are subscribed to the Google Groups “ERPNext Developer Forum” group.

    To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un…@googlegroups.com.

    To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/de5300db-fa43-4ccb-a1bd-e3b32c855fe8%40googlegroups.com.

    For more options, visit https://groups.google.com/d/optout.



Note:

 

If you are posting an issue,

  1. We should be able to replicate it at our end. So please give us as much information as you can. Please see it from the point of view of the person receiving the communication.
  2. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
  3. For sending images, use http://imgur.com or other similar services. Do not send images as attachments. Links are good. Same goes for any file you are going to send.

     

    End of Note



    You received this message because you are subscribed to the Google Groups "ERPNext Developer Forum" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un…@googlegroups.com.

    To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/D1117FCC-C819-4FE7-9694-007ABE64F0C4%40gmail.com.

    For more options, visit https://groups.google.com/d/optout.
Easiest way would be to add a "host_name" property in your site_config.json


On 09-Jul-2014, at 3:29 am, 'fbdystang' via ERPNext Developer Forum <er...@googlegroups.com> wrote:

Hi,

I am hosting the newest instance of frappe bench on digital ocean (which is working GREAT by the way, kudos to Frappe team). All of the emails are correctly sent from the install. However, every email has a link that refers back to www.erpnext.com/**** as if it was hosted there. I assumed these email templates would be found in the form customizations, but I couldn't find them. Where are they? In the templates/email/newuser.html found on github here:

https://github.com/frappe/frappe/blob/1804f7133d889245bfdec1d04ed10e62ff8b2ee3/frappe/templates/emails/new_user.html

It just states

{{ link }}

But no actual links. Where can I redefine that variable to point to the right place? Would the change survive an update?

Note: I am not talking about the "powered by ERPNext" links, these links are different.

Example: I create a new user in erpnext. That user receives an invitation with a login id and a link to log in. That is the link that goes to an invalid http://erpnext.com/*** URL. Obviously I would like to add users and have them go to the correct link to log in.

How do I correct those links found in all emails? Please advise.

Thanks,

fbdystang



Note:

 

If you are posting an issue,

  1. We should be able to replicate it at our end. So please give us as much information as you can. Please see it from the point of view of the person receiving the communication.
  2. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
  3. For sending images, use http://imgur.com or other similar services. Do not send images as attachments. Links are good. Same goes for any file you are going to send.

     

    End of Note



    You received this message because you are subscribed to the Google Groups “ERPNext Developer Forum” group.

    To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un…@googlegroups.com.

    To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/de5300db-fa43-4ccb-a1bd-e3b32c855fe8%40googlegroups.com.

    For more options, visit https://groups.google.com/d/optout.



Note:

 

If you are posting an issue,

  1. We should be able to replicate it at our end. So please give us as much information as you can. Please see it from the point of view of the person receiving the communication.
  2. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
  3. For sending images, use http://imgur.com or other similar services. Do not send images as attachments. Links are good. Same goes for any file you are going to send.

     

    End of Note



    You received this message because you are subscribed to the Google Groups "ERPNext Developer Forum" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un…@googlegroups.com.

    To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/2572DB97-8DD5-4E91-B2E7-0CE10DA90A67%40gmail.com.

    For more options, visit https://groups.google.com/d/optout.

Rushabh,

That worked! I entered that line into site_config.json to get:

{
 "db_name": "****mydbname",
 "db_password": "******mypassword",
 "host_name": "http://*****myhostedurl.com"
}

The links show up correctly now, however, my users now have emails with incorrect links. How do I delete users and re-add them so they get the correct welcome email?

Please let me know.

Thanks,

fbydystang


On Tuesday, July 8, 2014 11:15:01 PM UTC-6, rushabh wrote:
Easiest way would be to add a "host_name" property in your site_config.json


On 09-Jul-2014, at 3:29 am, 'fbdystang' via ERPNext Developer Forum <erpnext-dev...@googlegroups.com> wrote:

Hi,

I am hosting the newest instance of frappe bench on digital ocean (which is working GREAT by the way, kudos to Frappe team). All of the emails are correctly sent from the install. However, every email has a link that refers back to www.erpnext.com/**** as if it was hosted there. I assumed these email templates would be found in the form customizations, but I couldn't find them. Where are they? In the templates/email/newuser.html found on github here:

https://github.com/frappe/frappe/blob/1804f7133d889245bfdec1d04ed10e62ff8b2ee3/frappe/templates/emails/new_user.html

It just states

{{ link }}

But no actual links. Where can I redefine that variable to point to the right place? Would the change survive an update?

Note: I am not talking about the "powered by ERPNext" links, these links are different.

Example: I create a new user in erpnext. That user receives an invitation with a login id and a link to log in. That is the link that goes to an invalid http://erpnext.com/*** URL. Obviously I would like to add users and have them go to the correct link to log in.

How do I correct those links found in all emails? Please advise.

Thanks,

fbdystang



Note:

 

If you are posting an issue,

  1. We should be able to replicate it at our end. So please give us as much information as you can. Please see it from the point of view of the person receiving the communication.
  2. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
  3. For sending images, use http://imgur.com or other similar services. Do not send images as attachments. Links are good. Same goes for any file you are going to send.

     

    End of Note



    You received this message because you are subscribed to the Google Groups “ERPNext Developer Forum” group.

    To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un…@googlegroups.com.

    To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/de5300db-fa43-4ccb-a1bd-e3b32c855fe8%40googlegroups.com.

    For more options, visit https://groups.google.com/d/optout.



Note:

 

If you are posting an issue,

  1. We should be able to replicate it at our end. So please give us as much information as you can. Please see it from the point of view of the person receiving the communication.
  2. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
  3. For sending images, use http://imgur.com or other similar services. Do not send images as attachments. Links are good. Same goes for any file you are going to send.

     

    End of Note



    You received this message because you are subscribed to the Google Groups "ERPNext Developer Forum" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un…@googlegroups.com.

    To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/3b295539-2370-4935-89fd-5d310af5de61%40googlegroups.com.

    For more options, visit https://groups.google.com/d/optout.
Maybe you can just reset their passwords. They will get those mails...


On 09-Jul-2014, at 12:12 pm, 'fbdystang' via ERPNext Developer Forum <er...@googlegroups.com> wrote:


Rushabh,

That worked! I entered that line into site_config.json to get:

{
 "db_name": "****mydbname",
 "db_password": "******mypassword",
 "host_name": "http://*****myhostedurl.com"
}

The links show up correctly now, however, my users now have emails with incorrect links. How do I delete users and re-add them so they get the correct welcome email?

Please let me know.

Thanks,

fbydystang


On Tuesday, July 8, 2014 11:15:01 PM UTC-6, rushabh wrote:
Easiest way would be to add a "host_name" property in your site_config.json


On 09-Jul-2014, at 3:29 am, 'fbdystang' via ERPNext Developer Forum <erpnext-dev...@googlegroups.com> wrote:

Hi,

I am hosting the newest instance of frappe bench on digital ocean (which is working GREAT by the way, kudos to Frappe team). All of the emails are correctly sent from the install. However, every email has a link that refers back to www.erpnext.com/**** as if it was hosted there. I assumed these email templates would be found in the form customizations, but I couldn't find them. Where are they? In the templates/email/newuser.html found on github here:

https://github.com/frappe/frappe/blob/1804f7133d889245bfdec1d04ed10e62ff8b2ee3/frappe/templates/emails/new_user.html

It just states

{{ link }}

But no actual links. Where can I redefine that variable to point to the right place? Would the change survive an update?

Note: I am not talking about the "powered by ERPNext" links, these links are different.

Example: I create a new user in erpnext. That user receives an invitation with a login id and a link to log in. That is the link that goes to an invalid http://erpnext.com/*** URL. Obviously I would like to add users and have them go to the correct link to log in.

How do I correct those links found in all emails? Please advise.

Thanks,

fbdystang



Note:

 

If you are posting an issue,

  1. We should be able to replicate it at our end. So please give us as much information as you can. Please see it from the point of view of the person receiving the communication.
  2. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
  3. For sending images, use http://imgur.com or other similar services. Do not send images as attachments. Links are good. Same goes for any file you are going to send.

     

    End of Note



    You received this message because you are subscribed to the Google Groups “ERPNext Developer Forum” group.

    To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un…@googlegroups.com.

    To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/de5300db-fa43-4ccb-a1bd-e3b32c855fe8%40googlegroups.com.

    For more options, visit https://groups.google.com/d/optout.




Note:

 

If you are posting an issue,

  1. We should be able to replicate it at our end. So please give us as much information as you can. Please see it from the point of view of the person receiving the communication.
  2. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
  3. For sending images, use http://imgur.com or other similar services. Do not send images as attachments. Links are good. Same goes for any file you are going to send.

     

    End of Note



    You received this message because you are subscribed to the Google Groups “ERPNext Developer Forum” group.

    To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un…@googlegroups.com.

    To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/3b295539-2370-4935-89fd-5d310af5de61%40googlegroups.com.

    For more options, visit https://groups.google.com/d/optout.



Note:

 

If you are posting an issue,

  1. We should be able to replicate it at our end. So please give us as much information as you can. Please see it from the point of view of the person receiving the communication.
  2. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
  3. For sending images, use http://imgur.com or other similar services. Do not send images as attachments. Links are good. Same goes for any file you are going to send.

     

    End of Note



    You received this message because you are subscribed to the Google Groups "ERPNext Developer Forum" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un…@googlegroups.com.

    To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/48187BDF-2580-48EA-B3CA-1E1438A60192%40gmail.com.

    For more options, visit https://groups.google.com/d/optout.