Joomla 2.5 - RSForm! PRO Email Submission Based on User - joomla

I have this scenario in mind:
I would like to implement the form in such a way that it sends the form to different email addresses based on User.
Scenario:
User A sends Form X to Email Address 1
User B sends Form X to Email Address 2
User C sends Form X to Email Address 3
I can used {global:fullname} to capture the logged in user. Currently, I have a set of list (dropdown) for users to choose the email address to send to. It does not look professional and I intend to change the workflow.
Any help or assistance is greatly appreciated.
Thank you.

RSForm PRO is a very powerful forum builder. It allows you to add code to your forms to manipulate the behavior of the form.
In this post http://www.itoctopus.com/how-to-easily-create-notification-emails-for-form-submissions-in-rsform , we explain how to create a notification email. You will need to take the code in the post, and then, based on the logged in user, you modify the $mailer->addRecipient('[our-client-email]'); code in order to send the email to the appropriate user. Of course, you will need to make some other minor changes, but you get the point.
Hope this helps!

Related

Laravel 5.4 How to reset password with sms and notifications

I have see some articles, didn't find the solution.
I know Laravel 5.4's notifications have sms via Nexmo. And Nexmo is a third party website, one sms cost €0.0442 in my country.
But we have our own sms provider, and I had make it work. Our users have to provide real name, email, mobilephone. And the mobilephone have to be verified. I wrote a simple function to do it, with the provider's api.
I would like to implement the laravel notifications, make passwords reset via sms, like emails. How to do this?
The laravel password reset logic can be found in:
vendor/laravel/framework/src/Illuminate/Foundation/Auth/SendsPasswordResetEmails.php.
You can override the functions in there to accomodate for your sms needs.
But since that file is in the vendor folder you have/need to add the functions to:
app/Http/Controllers/Auth/ForgotPasswordController.php
(functions in the ForgotPasswordController override functions in SendsPasswordResetEmails)
Laravel has built in feature for resetting password via email, you can get lot of tutorials in this regards moreover if you want to create for sms validation then you will need a table which will hold the PIN (Personal Identification Number) for particular user, so suppose you have a table named password_pin you need to have columns with users_id, pin, validated_at, Now once you send a sms you can insert the data into these table and while verifying you can place updated with the validated at, you need to have logic where you want to have PIN to be validated once or can be verified more than once. As the validation happens you can show a form for updating the password and can update the password through those.
Note: You can must have a logic of validation in mind to conclude the architecture.
It will be more easier for us to guide you if you provide us the code. Hope this helps.

Saving data in parse to a not yet existing user

I am new at programming. I am building sort of like an chat app and I am using Parse as a backend. I want to make it possible for an existing user to send a message to a non existing user if the user knows the non existing-users email. The non-existing user will then get notified by the app on his email that this person send him a message and that he needs to sign up to read the message, and here is the question:
Does Parse makes it possible to chain this message to the non-existing users email, so that when he signs up in the app with this specific email the specific message to this email will display?
Thanks in advance.
No, not exactly.
You can create the user with the appropriate e-mail address and a made up password. Once that user exists (and hence is saved) you can start to associate things with it. After that you can send an e-mail to the prospective new user allowing them to complete the registration (this is basically a password reset).

Get user email in windows 10 universal app

I am trying to build a control that the user can use to send feedback to developer. I am using email as a delivery method and I leverage sendgrid email service for this. Now I want to know the users email address so I can respond back to the user's concern. I am not sure how to get the user's email in window 10. Any help or pointers please?
I would strongly recommend to use the sharing approach that has been introduced with Windows 8 - instead of writing and maintaining your own mail functionality and trying to access additional user data.
Have a look at the existing and built in e-mail functionalities. They make use of the user's connected mail accounts and the mail app. This way you don't need to worry about handling the message transmission or anything but rather hand the information over to the mail client. This way you also know how to reply back.
And as a bonus, the user can still access their message via the Sent Mails folder :)
There is a specific class for that, the EmailMessageClass (https://msdn.microsoft.com/en-us/library/windows/apps/windows.applicationmodel.email.emailmessage.aspx?cs-save-lang=1&cs-lang=csharp#code-snippet-1) as well as a dedicated guide with code example.
https://msdn.microsoft.com/en-us/library/windows/apps/mt269391.aspx
Essentially you can prepopulate the Mail fields with necessary app information where applicable. The user gets to choose which accounts he wants to send the mail from, but it will open in the mail client.

Approval link in email body

Need help in implementing email based approval system. Ex: Manager gets an auto triggered mail for his/her approval with a approval link in email body, when the manager clicks on the the link, it should validate the manager and then approve it. I tried searching on the internet but didn't find relevant resource.
Request you to Please help me with your ideas, suggestions or how I should proceed, or any plugin or jar is available??? It would be very helpful to me... Thanking you...
EDIT: Thanking you for replying. We have a java web app build using spring framework (MVC) where in employees can apply leaves which has to be approved by his/her manager. If an employee applies leave then a mail is triggered for approval to his/her manager with the leave details. After looking the mail, the manager logs-in to the application to approve or reject the leaves. So request you to Please help me in how to give a direct link in the mail to approve or reject the leaves.
For one of our applications we had the same requirements - employees can submit vacation requests and supervisors will be notified via mail. We have written an article about the exact way we did it - available here.
So in a nutshell, we are using Spring Integration and GMail. Each new vacation request yields an email send to all supervisors. Supervisors can reply with either approve or reject. We only accept email addresses from our domain, but since these can be faked we introduced a shared secret - a UUID added to the mail's subject which then relates to the id of the vacation request.
Once an email comes in we run the business logic to figure out whether a request shall be approved or rejected.
As I stated in my comment, I used Velocity to template my email message. You don't have to use it, but it made my job easier. You should be able to read up on it.
Java itself has the ability to send emails in it's Java EE framework using JavaMail, or you can use Spring's wrappers. You will need access to a mail server of some sorts, and would highly recommend that you setup an email box specifically for this process. I actually used my gmail account during testing, but I wouldn't recommend that for a long-term solution. I assume your company would have an email server setup somewhere you can use.
The process flow would be:
Employee fills out request
System generates an email to employee's manager(s) with a link to approve
Manager clicks on link, taken to approval page
Manager approves/denies request
The next question is how to build the URL. I would suggest using something like a UUID or something like that, or the request ID if that makes it easier. You can generate a UUID from any seed String or set of bytes. I like UUID because it obviscates the data being sent.
Anyway, the URL will basically point to a Spring form that will allow the user to approve that request. So, thinking about what you would need, I would expect some DB record that relates the information in the incoming request to the time off request that was filled out. Read in the record, load the page and display it. Simple enough.
The next issue is locking it down so only the authorized people can approve. Again, making a huge assumption here, but I am guessing you are using Spring Security? If you are, you should be able to add a condition to the Controller's handler for this approval form that requires the user to be authenticated (read here) and add a java.security.Principal to the handler methods arguments (read 15.3.2.3 here for what you can pass into a Controller's handler). With the Principal object in-hand, you should be able to compare that to a list of approvers associated with the request record in the DB. I would then have the system generate approval/denial emails that code to all concerned parties.
Let me reiterate that this is NOT the only solution, only one possible solution. This is why I feel this is not a good question for StackOverflow, as it asks a very broad question that doesn't really have a single right answer.

Is it possible to add a 'pending' subscriber to Mailchimp via the API?

Here's what I'd like to do:
User completes sign up form on my app
My app sends the input data (email address, name, etc) to Mailchimp via the API, but with a status of 'pending'
My app sends an email to the user asking them to confirm their email address (essentially emulating the Mailchimp confirmation email)
User clicks link in confirmation email, which takes them back to a confirmation page in my app
My app updates the user's status in Mailchimp to 'subscribed' via the API
Essentially, I want to emulate Mailchimps standard confirmation process, but sending the emails from my own app.
The part that I don't know how to do (or don't know if it's possible) is the part where I add a new subscriber with a status of 'pending'.
Here's some further info that's not strictly relevant but may be of interest...
Why don't I just use the standard Mailchimp confirmation email?
The confirmation email needs to contain extra info, unique to each user, that Mailchimp will not have access to.
Why don't I collect all the data locally and then send it all to Mailchimp once the user has confirmed their email address?
For reasons I won't go into, the number and type of required fields will be unknown. At the point when the sign up form is displayed, I will request the list of fields from Mailchimp and display the necessary fields. It is possible that, between the time when the user initially completes the form and the time when the user confirms via email, the required fields will have been changed. If I try to submit the previously collected data to Mailchimp after the required fields have been changed, it will cause an error.
So I need to collect and submit all data to Mailchimp at the same time. And then simply 'switch on' that user in Mailchimp once (s)he has confirmed.
I hope I've provided enough info. If not, happy to provide more or clarify any points.
Thanks!
The internal "pending" status is not able to be managed manually like that. You can subscribe them using double opt-in and then later force them onto the "subscribed" list, but you can't stop them from getting MailChimp's own confirmation email.
One possible work-around would be to add an interest group or merge field that is populated by your system once you've confirmed the email address. You'd then create a saved segment for only confirmed users and make sure you only ever send to that segment and never the whole list.
Another possibility, if you use API v3.0 (which is currently only in beta), is to add them to your list as unsubscribed and then switch their status to "subscribed" once you've confirmed them. If you do this, be very careful that you're not re-subscribing users who unsubscribed or you could wind up in trouble.
This workflow is definitely 100% possible in the current (V3) of the API. Just set the "status" field on a member to "pending" and then to "subscribed".

Resources