Using more then one "from/reply-to" address to email from mydbr

(23 posts) (2 voices)


  1. eugfri, Member


    I have been successfully using "from/reply-to" address setup as part of mydbr environment settings in order to send emails from inside of my reports. However, now I must use more than one "from/reply-to" address for sending email messages (one type of report I have to email from address A and another report - from address B).

    Could you suggest any possible ways to implement this?

    Thank you!


  2. myDBR Team, Key Master

    you can override the default sender information with dbr.mail.sender-option.

    myDBR Team

  3. eugfri, Member

    yes I can, I tried that. But I need to be able to authenticate that "other sender" with the mail server. How do I pass the password?

  4. myDBR Team, Key Master

    What do you mean by authentication, the SMTP authentication? The SMTP authentication is not tied into the "from/reply-to" address.

    myDBR Team

  5. eugfri, Member

    Yes, SMTP authentication info. I know its not tied to "from/reply-to" address itself, but if I am using different smtp accounts (email addresses) - their username/pwd for SMTP server are different.
    I can specify one in Mail section of "Environmental Settings" page, but how would I supply SMTP login/pwd to dbr.mail if I want to use another sender?

  6. myDBR Team, Key Master

    for now myDBR supports only one SMTP server. We can add additional functionality to the mail extension to make it possible to use different mailer (smtp, mail, sendmail, qmail) and also use different settings for these. This will be an easy change.

    What is the reason for using another SMTP server?
    myDBR Team

  7. eugfri, Member

    I have to use same smtp server but different accounts (I.e. from addresses/mailboxes). Use case is very simple. For example, updates about processed RMAs should be sent to customers from one address, but follow ups on RFQs to customers should be sent from another address.
    It's a typical situation for small client to use some hosted mail service such as Microsoft's Office or Google etc. In such case SMTP server would be the same for all senders, but each sender would have their own login and pwd for SMTP server.

  8. myDBR Team, Key Master

    As said, SMTP server does not dictate the from addresses seen in the mail. You can use the same SMTP connection and define different sender / reply-to. What is the benefit the other SMTP server offers you?

    myDBR Team

  9. eugfri, Member

    Probably the most generic modification to help with this would be to enable feeding SMTP server password to dbr.mail as an option, just like allowing to feed different senders using dbr.mail.sender. I.e. have something like dbr.mail.password.

  10. eugfri, Member

    I am not trying to use more then one SMTP server at all. I simply have some messages that have to go from the system as being from "" and others - as "".
    My SMTP server is Microsoft Office 365 mail server, so user1 and user2 have different SMTP passwords.
    I must use user1/password1 to send msgs from and user2/password2 when I need to send msgs from

  11. myDBR Team, Key Master

    Your server rejects the outgoing mail if you specify as from/reply-to when you are logged in as

    myDBR Team

  12. eugfri, Member

    yes. Exactly.

  13. myDBR Team, Key Master

    we'll add an option to authenticate as another user, no problem.

    myDBR Team

  14. eugfri, Member

    That wound be great!

  15. eugfri, Member

    Will you let me know here when to update mydbr to the latest patch version?

  16. myDBR Team, Key Master

    you can now use a new command dbr.mail.smtp.authentication to define an alternative user & password.

    select 'dbr.mail.smtp.authentication', 'username', 'password';

    myDBR Team

  17. eugfri, Member

    Thank you very much!
    It does without saying I must update mydbr to the latest patch version.

  18. eugfri, Member

    Actually, I am still struggling with making this work.
    It seems that order of dbr.mail options makes a significant difference and I am probably not using the correct one.
    I have tried to switch things around, but still get an error.
    Here is the sample code:

    SELECT 'dbr.mail', 0;

    SELECT 'dbr.mail.debug', 1;

    SELECT 'dbr.mail.smtp.server', '', 587, 1; SELECT 'dbr.mail.smtp.authentication', '', 'mypassword'; SELECT 'dbr.mail.recipient', '', 'FirstName LastName';

    SELECT email, name, subject, body FROM mytable;

    Here is the error:


    Invalid address: dbr.mail.smtp.authentication

    I know that parameters I am passing to dbr.mail.smtp.authentication are valid, email address and password work when logging into Microsoft hosted Office365 exchange server.

    I am not sure if I am using dbr.mail.smtp.server correctly though... Encryption method used is TLS, but I am not sure how to indicate that.

    I also tried removing dbr.mail.smtp.server in order to use mail server from mydbr options, but the error is still the same - Invalid address: dbr.mail.smtp.authentication

  19. myDBR Team, Key Master

    there was an error in the example above. The correct command for defining the user / password is:

    select 'dbr.mail.smtp.user', '', 'mypassword';

    The encryption method in dbr.mail.smtp.server is either 'tls', 'ssl':

    select 'dbr.mail.smtp.server', '', 587, 'tls';

    Note that you do not need to define the server if it is the same as the the default.

    myDBR Team

  20. eugfri, Member


    it seems like now all email functionality has stopped working....

    I am using

    SELECT 'dbr.mail', 0;

    SELECT 'dbr.mail.debug', 1;

    SELECT '' as email, 'MyName' as name, 'test msg' AS subject, 'test msg' AS body;

    for simple test and i have updated my installation to the latest 4.6.4 build 3011.

    I get

    Sent 1 mail with no errors

    But email never comes to my gmail box (sent to myself).
    Also, there is no debug output either even though flag is set to 1.

    This is all very strange.
    Are you sure this change did not break anything in the latest build?

  21. myDBR Team, Key Master

    That does not sound right. You should get the debug messages when the debug flag is set. The mail delivery itself might fail elsewhere. It looks that the mail sending works though.

    Make sure you have a fresh copy of myDBR: run the updater and try again.

    If that does not solve the issue, open a support ticket.

    myDBR Team

  22. eugfri, Member

    I ran update again to 4.6.4 build 3013 but my simplest test email proc still does not work and does not display debug info. I just sent all the details to your support mailbox -

  23. eugfri, Member

    Just to conclude this thread in case someone runs into the same issue.
    It seems like hosted Microsoft Office 365 Exchange simply does not support "sending as" functionality.
    Most likely its done for security purposes, so even use of dbr.mail.smtp.user did not help. The only way around is either to try to configure smtp relay, or give extra perms to the smtp login setup in mydbr environment in order to "send as" other users, which is what I have done.
    This way even simple dbr.mail.sender function works just fine as intended.


You must log in to post.