Roundcube Community Forum

Release Support => Pending Issues => Topic started by: mythri on February 11, 2015, 12:32:28 PM

Title: How to bypass login page and landing to mails page directly from a php script
Post by: mythri on February 11, 2015, 12:32:28 PM
Hello All,

I have installed roundcube to access emails. I have a small php application in which user creates an invoice after logging in, Once he selects email option it has to redirect directly to emails page of roundcube by taking that username and password from that application with that pdf attachment.

I tried , but couldn't get how to bypass it.

Can somebody please help me in this?
Title: Re: How to bypass login page and landing to mails page directly from a php script
Post by: SKaero on February 11, 2015, 08:15:29 PM
Look at the autologon plugin for an example of how to accept remote variables.
Title: Re: How to bypass login page and landing to mails page directly from a php script
Post by: mythri on February 13, 2015, 07:10:08 AM
Hey Thanks! I am able to do it. But after generating a pdf, i click on email from my script then it should go to compose mail section with the attachment in RC. How can i achieve this? . Plz do share if anybody knows any related thread or any suggestion for this

Thanks in advance
Title: Re: How to bypass login page and landing to mails page directly from a php script
Post by: mythri on February 17, 2015, 12:14:42 AM
Can somebody please look into it? Thank you
Title: Re: How to bypass login page and landing to mails page directly from a php script
Post by: SKaero on February 17, 2015, 04:05:21 AM
You can add attachments with the message_compose hook: http://trac.roundcube.net/wiki/Plugin_Hooks#message_compose
Title: Re: How to bypass login page and landing to mails page directly from a php script
Post by: mythri on February 17, 2015, 05:10:34 AM
Thanks, But can you please explain me a bit, how can i use it in the code? Is there any example or syntax i can refer. Please let me know. Its very urgent for me to do
Title: Re: How to bypass login page and landing to mails page directly from a php script
Post by: SKaero on February 17, 2015, 05:31:32 AM
Here is the official plugin documentation: http://trac.roundcube.net/wiki/Doc_Plugins its best to look at existing plugin for practical examples.
Title: Re: How to bypass login page and landing to mails page directly from a php script
Post by: mythri on February 17, 2015, 05:49:49 AM
Actually i am naive here. In this i understood that i need to write a new plugin for this. Please correct me if i am wrong. :-[
Title: Re: How to bypass login page and landing to mails page directly from a php script
Post by: SKaero on February 17, 2015, 11:51:03 AM
I can't think of a plugin that already exists that meets your needs, so I think you need to code a new plugin. However all the needed API exist so it shouldn't be to hard.
Title: Re: How to bypass login page and landing to mails page directly from a php script
Post by: mythri on February 17, 2015, 01:28:50 PM
Can you give me any hint that how i can do it?
Title: Re: How to bypass login page and landing to mails page directly from a php script
Post by: SKaero on February 17, 2015, 01:42:48 PM
What type of "hint" do you need? Reading the plugin documentation will tell you about structure of Roundcube plugins, then you can use the message_compose hook to add attachments to new emails.