How to address the sender to different email address using sendEmail() SIL routines

Randee024 January 4, 2018

I change my smtp email address and i tested it and it successfully connect and using the send a email test i tried to send an email to my account it works fine. but when i use it on my projects it is still using the old smtp email address that i have been changed before. im using it in sendEmail() SIL routine.

4 answers

1 accepted

0 votes
Answer accepted
Randee024 March 7, 2018

Ive solved this issue its just because we need to grant the send on be half of both email.

0 votes
Edie lenee January 12, 2021

You need to examine the outside ip address of your Bamboo device as you can see here, the one that connects it to your network. Try ip or ipconfig to discover what it is.

0 votes
Jonathan Muse {Appfire}
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 10, 2018

Hi Randy, do you have logging configured for your Power Scripts add-on?

Configure JIRA Logging

This is the first place I think we should start.

Thanks

Randee024 January 10, 2018

Hi Jonathan,

Done adding

"log4j.category.com.keplerrominfo = INFO, console, filelog
log4j.additivity.com.keplerrominfo = false
"

in atlassian-jira/WEB-INF/classes/log4j.properties

What should we do next.

Thank you so much,
Randy


Jonathan Muse {Appfire}
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 12, 2018

Great, after you try to send an email and it doesn't go through are any messages in the logs? 

Randee024 January 14, 2018

here is my mail sender configuration : send mail Via : Direct Sender, defaults

 

 

then here is the error log:

2018-01-15 08:59:07,072 pool-66-thread-2 ERROR randyd 1042x1022x1 1dt4p8f 192.168.85.158 /rest/keplerrominfo/refapp/latest/async-script/checkScript [c.k.s.email.direct.DirectMailSender] Cannot send email
com.sun.mail.smtp.SMTPSendFailedException: 550 5.7.1 Client does not have permissions to send as this sender

 at com.sun.mail.smtp.SMTPTransport.issueSendCommand(SMTPTransport.java:2267)
 at com.sun.mail.smtp.SMTPTransport.finishData(SMTPTransport.java:2045)
 at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:1260)
 at javax.mail.Transport.send0(Transport.java:255)
 at javax.mail.Transport.send(Transport.java:124)
 at com.keplerrominfo.sil.email.direct.DirectMailSender.sendMail(DirectMailSender.java:162)
 at com.keplerrominfo.sil.email.TextProcessingMailSender.sendMail(TextProcessingMailSender.java:30)
 at com.keplerrominfo.sil.lang.routines.system.SendEmailRoutine._executeRoutine(SendEmailRoutine.java:204)
 at com.keplerrominfo.sil.lang.routines.system.SendEmailRoutine.executeRoutine(SendEmailRoutine.java:88)
 at com.keplerrominfo.sil.lang.AbstractRoutine.execute(AbstractRoutine.java:77)
 at com.keplerrominfo.sil.lang.grammar.ASTCallNode.interpret(ASTCallNode.java:73)
 at com.keplerrominfo.sil.lang.grammar.SILNode.interpret(SILNode.java:139)
 at com.keplerrominfo.sil.lang.grammar.ASTReturnNode.interpret(ASTReturnNode.java:40)
 at com.keplerrominfo.sil.lang.grammar.SILNode.interpret(SILNode.java:139)
 at com.keplerrominfo.sil.lang.grammar.ASTParseNode.interpret(ASTParseNode.java:37)
 at com.keplerrominfo.sil.lang.executors.CachedInterpreterExecutor.directInterpret(CachedInterpreterExecutor.java:86)
 at com.keplerrominfo.sil.lang.executors.CachedInterpreterExecutor.interpret(CachedInterpreterExecutor.java:79)
 at com.keplerrominfo.sil.lang.SILInterpreter.interpret(SILInterpreter.java:92)
 at com.keplerrominfo.jira.commons.ivm.IssueSILInterpreter.interpret(IssueSILInterpreter.java:185)
 at com.keplerrominfo.refapp.sil.impl.AbstractSimpleLanguageService.interpret(AbstractSimpleLanguageService.java:166)
 at com.keplerrominfo.refapp.sil.SILRunCallable.createResult(SILRunCallable.java:63)
 at com.keplerrominfo.jira.commons.sil.impl.JIRASILRunCallable.createResult(JIRASILRunCallable.java:65)
 at com.keplerrominfo.jira.commons.sil.impl.JIRASILRunCallable.createResult(JIRASILRunCallable.java:26)
 at com.keplerrominfo.refapp.threading.AsyncRunnerCallable.call(AsyncRunnerCallable.java:65)
 at com.keplerrominfo.refapp.threading.AsyncRunnerCallable.call(AsyncRunnerCallable.java:22)
 at java.util.concurrent.FutureTask.run(FutureTask.java:266)
 at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
 at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
 at java.lang.Thread.run(Thread.java:745)
2018-01-15 08:59:07,072 pool-66-thread-2 ERROR randyd 1042x1022x1 1dt4p8f 192.168.85.158 /rest/keplerrominfo/refapp/latest/async-script/checkScript [c.k.s.l.routines.system.SendEmailRoutine] Could not send mail [ex].
com.keplerrominfo.sil.email.EmailException: Cannot send email
 at com.keplerrominfo.sil.email.direct.DirectMailSender.sendMail(DirectMailSender.java:171)
 at com.keplerrominfo.sil.email.TextProcessingMailSender.sendMail(TextProcessingMailSender.java:30)
 at com.keplerrominfo.sil.lang.routines.system.SendEmailRoutine._executeRoutine(SendEmailRoutine.java:204)
 at com.keplerrominfo.sil.lang.routines.system.SendEmailRoutine.executeRoutine(SendEmailRoutine.java:88)
 at com.keplerrominfo.sil.lang.AbstractRoutine.execute(AbstractRoutine.java:77)
 at com.keplerrominfo.sil.lang.grammar.ASTCallNode.interpret(ASTCallNode.java:73)
 at com.keplerrominfo.sil.lang.grammar.SILNode.interpret(SILNode.java:139)
 at com.keplerrominfo.sil.lang.grammar.ASTReturnNode.interpret(ASTReturnNode.java:40)
 at com.keplerrominfo.sil.lang.grammar.SILNode.interpret(SILNode.java:139)
 at com.keplerrominfo.sil.lang.grammar.ASTParseNode.interpret(ASTParseNode.java:37)
 at com.keplerrominfo.sil.lang.executors.CachedInterpreterExecutor.directInterpret(CachedInterpreterExecutor.java:86)
 at com.keplerrominfo.sil.lang.executors.CachedInterpreterExecutor.interpret(CachedInterpreterExecutor.java:79)
 at com.keplerrominfo.sil.lang.SILInterpreter.interpret(SILInterpreter.java:92)
 at com.keplerrominfo.jira.commons.ivm.IssueSILInterpreter.interpret(IssueSILInterpreter.java:185)
 at com.keplerrominfo.refapp.sil.impl.AbstractSimpleLanguageService.interpret(AbstractSimpleLanguageService.java:166)
 at com.keplerrominfo.refapp.sil.SILRunCallable.createResult(SILRunCallable.java:63)
 at com.keplerrominfo.jira.commons.sil.impl.JIRASILRunCallable.createResult(JIRASILRunCallable.java:65)
 at com.keplerrominfo.jira.commons.sil.impl.JIRASILRunCallable.createResult(JIRASILRunCallable.java:26)
 at com.keplerrominfo.refapp.threading.AsyncRunnerCallable.call(AsyncRunnerCallable.java:65)
 at com.keplerrominfo.refapp.threading.AsyncRunnerCallable.call(AsyncRunnerCallable.java:22)
 at java.util.concurrent.FutureTask.run(FutureTask.java:266)
 at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
 at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
 at java.lang.Thread.run(Thread.java:745)
Caused by: com.sun.mail.smtp.SMTPSendFailedException: 550 5.7.1 Client does not have permissions to send as this sender

 at com.sun.mail.smtp.SMTPTransport.issueSendCommand(SMTPTransport.java:2267)
 at com.sun.mail.smtp.SMTPTransport.finishData(SMTPTransport.java:2045)
 at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:1260)
 at javax.mail.Transport.send0(Transport.java:255)
 at com.keplerrominfo.sil.email.direct.DirectMailSender.sendMail(DirectMailSender.java:162)
 ... 23 more
Jonathan Muse {Appfire}
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 15, 2018

Randy, I am trying to get some developer support on this. Can you try changing to Container Sender in you Mail Sender Options?

Thanks

Randee024 January 15, 2018

yeah i already done doing it. i tested with all the option. if i set it on container sender then it will run using the new smtp that i have configured. but when i used the Direct Sender, defaults the notification will run using different email, and the old smtp that i configure will works well in SIL sendEmail() routine, but if i use the new smtp email server it will not send any email. i found out that if I use different sender except on my old smtp email it will not work/send any email in Direct Sender, defaults. i appreciate your effort i need to fix this because its been 2weeks since i started debugging this scenario.

 

Changing my old smtp server configuration from(admin email) to (support email).


Copied at the top conversation:

Using Direct Sender, defaults:
"Scenario: if i will use my new email(support email) in sendEmail() routines it will not send email to the recipient, but if i will use the old email(admin email) in sendEmail() routine it works well.

I tried different things. changing the sender configuration, changing the project notification email but still i cant use my new smtp it will work fine if i will use the old one although i will not reset it back to the old smtp configuration still fine.

and if i will use the notification it will work fine. it only matters in the sendEmail() routine. "

Using Container Sender
Scenario: if i will use my new email(support email) in sendEmail() routines it will send email to the recipient, but if i will use other email like (admin email) in sendEmail() routine the email will not send  and will be in email queue. And send notification will not run/ will just stay at the mail queue unless I set the notification scheme to my new email (support email). 


just let me know if you still need more details. 



Thank you so much,
Randy

Randee024 January 15, 2018

Clarification:

I just need to send custom email using different email using SIL sendEmail() routines only. example : i need to send email using support email and admin email as the sender.

thats was my goal here.

Thank you,
Randy

Jonathan Muse {Appfire}
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 16, 2018

Hi Randy, the developers are telling me that the error message you are seeing means that there is a error in the email configuration. Some possible causes of this could be:

  • Incoming IP address is blacklisted
  • Improper SMTP address is being used
  • Individual client authorization issues

Either way it appears that this is an issue you will probably need to take up with your email administrator.

See the following links for some additional information about the error:

http://forums.msexchange.org/m_1800412481/printable.htm
https://community.ivanti.com/docs/DOC-53284

Randee024 January 16, 2018

Hi Jonathan,

Ill check it out maybe give me a day to response about this.


Thank you,
Randy

Randee024 January 18, 2018

Hi jonathan,

I just want to know if it is possible to send email using different user email address in sendEmail() routine on SIL? 

Thank you,
Randy

0 votes
AnnWorley
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
January 8, 2018

Hi Randy,

I hope you don't mind a few questions before I offer an answer.

  1. When you changed your smtp email address, was that in Confluence administration>Mail servers? If not, where was it changed?
  2. Are you using our Atlassian Cloud offering or hosting Confluence Server yourself?
  3. If you are self-hosted, what version of Confluence are you using?
  4. Please let me know more about how you are using the email on your projects. Do you mean Jira projects? (Confluence does not have projects like Jira, but I understand you may use Confluence to work on other types of projects.)

I look forward to learning more about the issue you are running into, and helping however I can.

Thanks,

Ann

Randee024 January 8, 2018

Hi Ann,

Im so sorry im just new in jira development i thought confluence just a feature/application of jira?

by the way i hope you can still help me.

1. Yes in my outgoing mail server see 1st.jpg here is where i change it.1st.jpg
2. were hosting our own server.
3. i think this is what your asking.(sorry for misunderstood)
2nd.jpg4. I need to send email to different user.
first we have an existing SMTP server (admin email) and i need to change the SMTP server to different email from (admin email) to (support email) using the same Host but different username and password.

second i test the connection and it is successful after that i tried using the send a test email to try it and i received the email.

third i need to use the sendEmail() routines of SIL for custom email that i will send in different functions/events in jira. 

Scenario: if i will use my new email(support email) in sendEmail() routines it will not send email to the recipient, but if i will use the old email(admin email) in sendEmail() routine the email will be sent and i received it.

I tried different things. changing the sender configuration, changing the project notification email but still i cant use my new smtp it will work fine if i will use the old one although i will not reset it back to the old smtp configuration still fine.

and if i will use the notification it will work fine. it only matters in the sendEmail() routine. i think its in the base url set in our general configuration?

i hope you can help me its been a week for debugging this issue.
if you still need more info just tell me ill provide it.

Thank you so much,
Randy

Randee024 January 8, 2018

by the way were using outlook email servers
Thanks

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events