Hi Jeff, I had forgotten to configure OAuth for the service provider. I followed the instructions mentioned in the link you just shared and configured , and added the client key and secret key in the pga_config.php. Also, I changed the links in the email-admin config.xml as you had mentioned. But it looks like the issue did not resolve. It still fails to send an email. These are how my files look now.
On Fri, May 27, 2016 at 5:56 PM, Jeff <[email protected]> wrote: > It looks like your OAuth client key and OAuth client secret in > pga_config.php are the defaults--have you configured OAuth for your service > provider? This page of the docs has the relevant setup > <http://airavata.readthedocs.io/en/latest/WSO2-IS-Configuration/> > http://airavata.readthedocs.io/en/latest/WSO2-IS-Configuration/ > > Once you have the OAuth service set up, copy the client key and secret key > that are created into your pga-config.php. > > The other thing is that the links in email-admin-config.xml should be set > to something like > > https://localhost/airavata-php-gateway/public/reset-password?confirmation= > {confirmation-code}&userstoredomain={userstore-domain}&username={url:user-name}&tenantdomain={tenant-domain} > > for Password Reset and > > > https://localhost/airavata-php-gateway/public/confirm-user-registration?confirmation= > {confirmation-code}&userstoredomain={userstore-domain}&username={url:user-name}&tenantdomain={tenant-domain} > > for Account Confirmation. This points them to the local PGA pages that > handle password reset and account confirmation, respectively. > > Hope this helps! > Jeff K. > > > On Fri, May 27, 2016 at 5:42 PM, Abhishek Jain < <[email protected]> > [email protected]> wrote: > >> >> Hi All, >> >> I have locally set up the PGA and WSO2. They are up and running. I added >> the admin user credentials of the tenant that I created in the pga_conf.php >> file. So now when I try creating an account, I get a message that a >> confirmation link has been sent to the email account, but I can see an >> error in my IS log saying that sending of email has failed which is as >> follows : >> >> *[2016-05-27 14:19:34,698] @test.bu.com <http://test.bu.com> [1] [IS] >> INFO {org.wso2.carbon.identity.mgt.mail.DefaultEmailSendingModule} - >> Sending user credentials configuration mail to >> <[email protected]>[email protected] >> <[email protected]>* >> *[2016-05-27 14:19:35,403] @test.bu.com <http://test.bu.com> [1] >> [IS]ERROR {org.wso2.carbon.identity.mgt.mail.DefaultEmailSendingModule} - >> Failed Sending Email* >> *org.apache.axis2.AxisFault: Error generating mail message* >> * at >> org.apache.axis2.transport.base.AbstractTransportSender.handleException(AbstractTransportSender.java:226)* >> * at >> org.apache.axis2.transport.mail.MailTransportSender.sendMessage(MailTransportSender.java:184)* >> * at >> org.apache.axis2.transport.base.AbstractTransportSender.invoke(AbstractTransportSender.java:112)* >> * at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:442)* >> * at >> org.apache.axis2.description.OutOnlyAxisOperationClient.executeImpl(OutOnlyAxisOperation.java:297)* >> * at >> org.apache.axis2.client.OperationClient.execute(OperationClient.java:149)* >> * at >> org.apache.axis2.client.ServiceClient.fireAndForget(ServiceClient.java:511)* >> * at >> org.apache.axis2.client.ServiceClient.fireAndForget(ServiceClient.java:488)* >> * at >> org.wso2.carbon.identity.mgt.mail.DefaultEmailSendingModule.sendEmail(DefaultEmailSendingModule.java:116)* >> * at >> org.wso2.carbon.identity.mgt.mail.AbstractEmailSendingModule.notifyUser(AbstractEmailSendingModule.java:59)* >> * at >> org.wso2.carbon.identity.mgt.NotificationSendingModule.run(NotificationSendingModule.java:33)* >> * at >> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)* >> * at java.util.concurrent.FutureTask.run(FutureTask.java:262)* >> * at >> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)* >> * at >> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)* >> * at java.lang.Thread.run(Thread.java:745)* >> *Caused by: org.apache.axis2.AxisFault: Error creating mail message or >> sending it to the configured server* >> * at >> org.apache.axis2.transport.base.AbstractTransportSender.handleException(AbstractTransportSender.java:226)* >> * at >> org.apache.axis2.transport.mail.MailTransportSender.sendMail(MailTransportSender.java:505)* >> * at >> org.apache.axis2.transport.mail.MailTransportSender.sendMessage(MailTransportSender.java:175)* >> * ... 14 more* >> *Caused by: javax.mail.AuthenticationFailedException* >> * at javax.mail.Service.connect(Service.java:306)* >> * at javax.mail.Service.connect(Service.java:156)* >> * at javax.mail.Service.connect(Service.java:105)* >> * at javax.mail.Transport.send0(Transport.java:168)* >> * at javax.mail.Transport.send(Transport.java:98)* >> * at >> org.apache.axis2.transport.mail.MailTransportSender.sendMail(MailTransportSender.java:494)* >> * ... 15 more* >> >> >> I am attaching my pga_conf.php file and also, the email-admin-config.xml >> file. >> >> Also, I am attaching the screenshots of my tenant details and service >> provider details. >> >> Can you tell me what am I missing out or if I have made a mistake in the >> pga_config.php file ? >> >> >> -- >> Thanks & Regards, >> Abhishek Jain >> >> *Graduate Student* >> *Department of Computer Science* >> *Thomas J. Watson School of Engineering & Applied Science* >> *Binghamton University - State Univeristy of New York (SUNY)* >> >> >> > -- Thanks & Regards, Abhishek Jain *Graduate Student* *Department of Computer Science* *Thomas J. Watson School of Engineering & Applied Science* *Binghamton University - State Univeristy of New York (SUNY)*
<<attachment: pga_config.php>>
<!-- ~ Copyright (c) 2010, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. ~ ~ WSO2 Inc. licenses this file to you under the Apache License, ~ Version 2.0 (the "License"); you may not use this file except ~ in compliance with the License. ~ You may obtain a copy of the License at ~ ~ http://www.apache.org/licenses/LICENSE-2.0 ~ ~ Unless required by applicable law or agreed to in writing, ~ software distributed under the License is distributed on an ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY ~ KIND, either express or implied. See the License for the ~ specific language governing permissions and limitations ~ under the License. --> <!-- Contains the email templates which is used by identity recovery, account confirmation, OTP and account unlock features. This will be only loaded once. There after you need to use "Email templates" from Configuration menu for changes. --> <configurations> <configuration type="passwordReset"> <targetEpr></targetEpr> <subject>WSO2 Carbon - Password Reset</subject> <body> Hi {first-name} We received a request to change the password on the {user-name} account associated with this e-mail address. If you made this request, please click the link below to securely change your password: https://localhost/airavata-php-gateway/public/reset-password?confirmation={confirmation-code}&userstoredomain={userstore-domain}&username={url:user-name}&tenantdomain={tenant-domain} If clicking the link doesn't seem to work, you can copy and paste the link into your browser's address window. If you did not request to have your {user-name} password reset, simply disregard this email and no changes to your account will be made. </body> <footer> Best Regards, WSO2 Carbon Team http://www.wso2.com </footer> <redirectPath></redirectPath> </configuration> <configuration type="accountIdRecovery"> <targetEpr></targetEpr> <subject>WSO2 Carbon - Account Recovery</subject> <body> Hi {first-name} We received a request to recover your account user name. The account associated with us indicates that the user name is : {user-name} </body> <footer> Best Regards, WSO2 Carbon Team http://www.wso2.com </footer> <redirectPath></redirectPath> </configuration> <configuration type="accountConfirmation"> <targetEpr></targetEpr> <subject>WSO2 Carbon - Account Confirmation</subject> <body> Hi {first-name}, You have created an account with following user name User Name: {user-name} Please click the following link to unlock. If clicking the link doesn't seem to work, you can copy and paste the link into your browser's address window. https://localhost/airavata-php-gateway/public/confirm-user-registration?confirmation={confirmation-code}&userstoredomain={userstore-domain}&username={url:user-name}&tenantdomain={tenant-domain} </body> <footer> Best Regards, WSO2 Identity Server Team http://www.wso2.com </footer> <redirectPath></redirectPath> </configuration> <configuration type="temporaryPassword"> <targetEpr></targetEpr> <subject>WSO2 Carbon - Temporary Password</subject> <body> Hi {first-name}, Please find your temporary password below. User Name: {user-name} Temporary Password: {temporary-password} </body> <footer> Best Regards, WSO2 Identity Server Team http://www.wso2.com </footer> <redirectPath></redirectPath> </configuration> <configuration type="otp"> <targetEpr></targetEpr> <subject>WSO2 Carbon - One Time Password Reset</subject> <body> Hi {first-name}, Please use the password {otp-password} as the new password for your next login. </body> <footer> Best Regards, WSO2 Identity Server Team http://www.wso2.com </footer> <redirectPath></redirectPath> </configuration> <configuration type="askPassword"> <targetEpr></targetEpr> <subject>WSO2 Carbon - Password Change for New Account</subject> <body> Hi {first-name} Please change your password for the newly created account : {user-name}. Please click the link below to create the password. https://var/www/airavata-php-gateway/InfoRecoverySample/infoRecover/verify?confirmation={confirmation-code}&userstoredomain={userstore-domain}&username={url:user-name}&tenantdomain={tenant-domain} If clicking the link doesn't seem to work, you can copy and paste the link into your browser's address window. </body> <footer> Best Regards, WSO2 Carbon Team http://www.wso2.com </footer> <redirectPath></redirectPath> </configuration> <configuration type="accountUnLock"> <targetEpr></targetEpr> <subject>WSO2 Carbon - Your account unlocked</subject> <body> Hi {first-name}, Please note that the account registered with us with the user name : {user-name} has been unlocked by Admin. </body> <footer> Best Regards, WSO2 Identity Server Team http://www.wso2.com </footer> <redirectPath></redirectPath> </configuration> </configurations>
