Welcome e-mail not sent to remotely created user

Discussion in 'General' started by Milen Karaganski, Mar 18, 2021.

  1. Milen Karaganski

    Milen Karaganski New Member

    Hello.

    I have a "Default welcome email" template set and when I manually add a user to ISPConfig, the welcome email is sent.

    However, when I create a client remotely, such an e-mail is not sent. Is there a way to fix this?
     
  2. Th0m

    Th0m ISPConfig Developer Staff Member ISPConfig Developer

    Can you share the code you are using to create the user?
     
  3. Jesse Norell

    Jesse Norell Well-Known Member Staff Member Howtoforge Staff

    To be clear, these are (both) clients being created, not mail users?
     
    Th0m likes this.
  4. Milen Karaganski

    Milen Karaganski New Member

  5. Jesse Norell

    Jesse Norell Well-Known Member Staff Member Howtoforge Staff

    Looks like the mail is sent here, which as far as I know would run for adding a client from ui and api; perhaps the 'default_group' value on line 357 isn't set for sessions from the api? Dunno, just guessing, you could probably file an issue in gitlab on this. (bug report or feature request?)
     
  6. Milen Karaganski

    Milen Karaganski New Member

    This email is sent on wordpress side, not from ispconfig, thus I think it should be some missing feature for remote client creation (maybe?), because when I add a user from within ISPConfig email is sent.
     
  7. Jesse Norell

    Jesse Norell Well-Known Member Staff Member Howtoforge Staff

    Ah, ok, I thought you meant there was no welcome email sent by ispconfig when creating a client via the api; if the problem is in the wordpress plugin, you will need to contact the plugin author.
     
  8. Milen Karaganski

    Milen Karaganski New Member

    A bit of misunderstanding.

    1. The code you've pointed is to send the email on wordpress side by the plugin
    2. The email on wordpress side is being sent.
    3. The email from ispconfig is not sent.
     
  9. nhybgtvfr

    nhybgtvfr Well-Known Member HowtoForge Supporter

    don't actually have an answer for you, but just a thought..
    if you're creating your new ispconfig client from a wordpress form, using this plugin, and that wordpress itself then sends a welcome email to them, isn't it possible, even likely, that the api call the plugin uses to create the client in ispconfig is deliberately stopping ispconfig from sending it's own welcome email so that the client doesn't receive two different welcome emails?
     
  10. Milen Karaganski

    Milen Karaganski New Member

    I.e. the api script should explicitly say to ispconfig to send email? I thought this is internal function and everytime client is created, no matter how, email should be send.
     
  11. nhybgtvfr

    nhybgtvfr Well-Known Member HowtoForge Supporter

    i don't know, i've not looked at their code. but i believe the welcome emails can be turned off in ispconfig. perhaps when adding a client the plugin first makes an api call to turn off the welcome emails, then adds the client, and then turns the welcome emails back on afterwards?
     
  12. till

    till Super Moderator Staff Member ISPConfig Developer

    It is possible that this functionality is not implemented for the api.
     

Share This Page