Emailing for a request form

I hired someone to create a request form for a company's website. He did that. And then, as of January the company's email service changed their security to stop spammers, spoofers and other malfeasance. And what then happened is that several people stopped getting email requests from the company's website for service, sales or support.
The form is here: http://alertscientific.com/contact.php
Here is what I have that checks to see if everything is filled out properly (it's a file called function.php and it's called by the main script):
<?php
function checkinfo(&$pst)
          $states = explode("|","AK|AL|AR|AZ|CA|CO|CT|DC|DE|FL|GA|HI|IA|ID|IL|IN|KS|KY|LA|MA|MD|ME|MI|MN|MO|M S|MT|NC|ND|NE|NH|NJ|NM|NV|NY|OH|OK|OR|PA|RI|SC|SD|TN|TX|UT|VA|VT|WA|WI|WV|WY");
          $err = "";
          foreach($pst as $key => $val)
                    if(!empty($_POST[$key]))
                              switch($key)
                                        case "dob":
                                                  if(!strtotime($_POST[$key]))
                                                            $err .= $pst[$key]." ".$_POST[$key]." is not a valid date.\r<br />";
                                                  break;
                                        case "phone":
                                                  $temp = $_POST[$key];
                                                  if(substr($temp, 3, 1) != "-")
                                                            $temp = substr($temp, 0, 3)."-".substr($temp, 3, strlen($temp)-3);
                                                  if(substr($temp, 7, 1) != "-")
                                                            $temp = substr($temp, 0, 7)."-".substr($temp, 7, strlen($temp)-7);
                                                  if(!preg_match("/^([1]-)?[0-9]{3}-[0-9]{3}-[0-9]{4}$/i", $temp))
                                                            $err .= $pst[$key]." ".$_POST[$key]." is not a valid phone number.\r<br />";
                                                  break;
                                        case "state":
                                                  if(!in_array($_POST[$key], $states))
                                                            $err .= $pst[$key]." ".$_POST[$key]." is not a valid state. Please use your state's two character abreviation.\r<br />";
                                                  break;
                                        case "email":
                                                  if(!filter_var($_POST[$key], FILTER_VALIDATE_EMAIL))
                                                            $err .= $pst[$key]." ".$_POST[$key]." is not a valid email address.\r<br />";
                                                  break;
                                        case "zip":
                                                  $temp = str_replace("-","",$_POST[$key]);
                                                  if(!is_numeric($temp) || (strlen($temp) != 5 && strlen($temp) != 9)) {
                                                            $err .= $key." --- ".$pst[$key]." ".$_POST[$key]." is not a valid zip code.\r<br />";
                    } else {
                              $err .= $pst[$key]." is empty.\r<br />";
          if($err != "")
                    return "The following errors were found:\r\r<br />".$err;
          } else {
                    return $err;
?>
That is not the problem.
Now, we come to the problem:
validate.php does all of the heavy lifting.
<?php
require_once("function.php");
$expected = array("name"=>"Name", "need"=>"need", "address1"=> "Address 1", "city"=>"City", "state"=>"State", "zip"=>"Zip", "email"=>"Email", "phone"=>"Phone" );
$options = array("name"=>"Name", "title"=>"Title", "company"=>"Company", "need"=>"need", "address1"=>"Address 1",  "address2"=>"Address 2", "city"=>"City", "state"=>"State", "zip"=>"Zip", "email"=>"Email", "phone"=>"Phone", "httpagent"=>"Browser info: ", "httpref"=>"Referrer", "ip"=>"Ip address");
$needs = array("service"=>" service.", "sales"=>" a salesperson contact you.", "literature"=>" literature be sent to you.");
$wants = array("service"=>" service.", "sales"=>" to be contacted by a salesperson.", "literature"=>" that literature be sent.");
$errors = checkinfo($expected);
$serv_two = "[email protected]";
$lit_one = "[email protected]";
$sales_two = "[email protected]";
if($errors == "") {
          $replace = array("PHPNAME", "PHPNEED", "PHPIPADDRESS");
          $with = array($_POST['name'], $needs[$_POST['need']], $_POST['ip']);
          $output = file_get_contents("sendail.html");
          $output = str_replace($replace,$with, $output);
          $message = $_POST['name']." has requested".$wants[$_POST['need']]."\r";
          foreach($options as $key => $val) {
                    $message .= $val.": ".$_POST[$key]."\r";
    $headers =  'From: [email protected]' ."\r\n" .'Reply-To: [email protected]'. "\r\n" .'X-Mailer: PHP/' . phpversion();
          switch($_POST['need']) {
                    case "service":
                              $subj = "Service request";
                              mail($serv_one, $subj, $message, $headers);
                              mail($serv_two, $subj, $message, $headers);
                              break;
                    case "sales":
                              $subj = "Sales request";
                              mail($sales_one, $subj, $message, $headers);
                              mail($sales_two, $subj, $message, $headers);
                              break;
                    case "literature":
                              $subj = "Literature request";
                              mail($lit_one, $subj, $message, $headers);
                              mail($lit_two, $subj, $message, $headers);
                              break;
          echo $output;
} else {
          echo "Errors:<br />".$errors;
          echo "Please click the back button and update your choices.<br />";
echo "Validating...";
print_r($_POST);
?>
At issue here are the headers (shown in red). The incoming email server is blocking stuff from my website because my website is not the email server. And so no email is received, it is assumed to be spam.
How do I tease the actual sender's email out of the array  of stuff and place it into the headers?
Thanks!

Here's what I was looking for:
$headers =  'From:'.$_POST['email']."\r\n" .'Reply-To: '.$_POST['email']."\r\n" .'X-Mailer: PHP/' . phpversion();
Now, here's the problem...
The folks at the incoming server changed their security protocols in January, resulting in lots of messages not being delivered -- but the company had a second person receiving emails who did recieve them.
So, Some people got the emails, others didn't.
The email hosting people are very nice on the phone, but they blamed my server. Said that I had to change to port 2525. I was set up to port 25 (default for email) and 587. So I did that, as well as changed the code. Now, the email is from the sender with the reply-to from the sender.
But here is going to be the next step: If these people keep blaming "insecurity" at my end, I'll tell the company to switch to my server. Then a company whose name includes "Forest" will lose some easy money for providing email and webmail.
This problem will be solved. I have changed php code and I have altered the port. If their host isn't getting the emails in all in-boxes, we switch on Monday. I don't have time to play games.
-Mark

Similar Messages

  • SAP Best practice for Material request form

    Hai Sap gurus,
    Do we have any sap best practice for material request form? If so please help me to find this best practice provided by the SAP. I searched through sap help but i was unable to find one.
    Same way i also need to find the sap best practice for Change request form too...
    Thanking you all in advance.

    Hi,
    Check these links
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/2b50ac90-0201-0010-d597-8d833833f9e0
    and using the service market place link to down load the best practices
    http://www.sap.com/services/bysubject/servsuptech/index.epx

  • SCSM Authoring for Service Request forms

    We are planning to start SCSM authoring work . As of now we are planning to focus on Service Request forms . The intent is to get them on the  portal as Request Offering .There would be mainly 10-15 SR forms ,and now each of these forms would have some
    additional fields which we means we have to extend the SCSM CLASS in Service Manager DB . We have done authoring some time back where we extended the class and the field would be visible in the extension tab in SM. There would be some common fields/classes
    that would be made available in some/all offerings , and I am thinking that those fields can be extended in the SR form. Is there any way that other classes can be restricted only to certain offerings
    I may be wrong with my approach ,please correct me. Also I know you are super busy , if you can point me to some good materials/examples so that I can look up myself

    You must use "Inherit from this class" senction on authoring console. So u can create different SR class that
    containing different fields.
     

  • Is there a app for filling in a word document that I have been emailed for a application form ?

    II've received a word document through email that I need to fill in but obviously not able to do it on my iPad is there a app that will let me do this and email it back to them completed ? Haven't got a laptop handy so need to do it on iPad . Thanks in advance.

    You might not be doing anything wrong. I tried to download the application to see if I could fill it in using Pages, but I can't download it. I can email the link and when I open it, it simply takes me back to the website where the document resides in the scribd.com website. If you can place X's in some of the boxes, I would have to believe that the document can be edited but that's not necessarily so. If you open the file in Word, and you can't type text in the places where you think that you should be able to, I'm thinking that something is wrong with the file.
    Just so that I know we are talking about the same document, you are in the UK, correct? And this is a job application? If both are correct, did you request this to be emailed to you from the company?

  • Email for AdHoc Request

    Hi Experts ,
    I have follwoing requirement .We are using UWL
    1. When ever a Task though AdHoc reuqest in (collaberation task) UWL is created then the receiver should get an email notification in OutLook or Lostus Notes or any other email id
    2. Email should contain a link to that workitem .
    Is this possible .  Pleae let me know the ways.
    I need to send from  UWL side not from ECC
    Thanks

    Hi ,
    Any adhoc task created can generate a email.
    1)You will need to configure the notificator service.
    2)If you have already configured the notificator service you can create a task -->Click on More ooptions->Notifications(Select the option you need from the drop down.
    Many Thanks
    Ajeya

  • I forget password account and use Two ways to Recovery  I've lost the answers to the questions I've received any email for this Request

    Choose your Apple Support Communities username.
    Your username is your public identity in Apple Support Communities. It cannot be changed after you create your account.
    fadibayda    

    You need to ask Apple to reset your security questions; this can be done by clicking here and picking a method, or if your country isn't listed, filling out and submitting this form.
    They wouldn't be security questions if they could be bypassed without Apple verifying your identity.
    (110676)

  • Notification emails for received web forms

    Can I set these emails to display the customer's email address in the 'From' section of the email rather than my own so I can simply click reply in my email program?

    Hi,
    I tested using {module_emailaddress}and it worked. So under System Emails -> Workflow notification -> Email From Address: Please try to place "{module_emailaddress}" youremailaddress.
    Test a webform and click on reply to see the customer's email address. Though it is not showing in the 'From' section.
    Hope that helps!
    Kind Regards,

  • HT201304 How do I request a refund for "Refund for In-App Purchases made by a minor"? I received an email on this with a link that takes me into a loop with no request form to fill out as the email states. :(

    How do I request a refund for "Refund for In-App Purchases made by a minor"? I received an email on this with a link that takes me into a loop with no request form to fill out as the email states.

    Did you do this
    How to report/refund an issue with your iTunes Store, App Store, Mac App Store, or iBooks Store purchase
    or maybe
    1 - Use the Express lane and start here:
    https://expresslane.apple.com
    or the general place
    Apple - Support -form iTunes Store - Contact Us
    2 - Call Apple in your country by getting the number from here:
    http://support.apple.com/kb/HE57

  • Email task notifications with form attachment for approval

    I have a process that is started in Workspace and I have the preferences set for each of the users in the workflow to get task notifications via email with the form attached so they can approve/deny tasks in Reader/Acrobat without having to go back into Workspace.
    The email works fine, the form is sent to the assigned user, however I'm a bit lost as to what to do in my process so when the user clicks the submit button the XDP data is sent to the right place. Poking around here it looks like I need to set up a Complete Task with an email endpoint? My forms have the Process Fields component already attached to them and looking at the data.xdp it is populating with the task ID and other data.
    If that's that case a little bit of instructions on how to configure the Complete Task is in order for me. Do I put it on after each of the steps in the process that the form is transferred to different users, thus initiating more emails.
    Thanks,
    Mike

    I have added an Email endpoint to the process.<br />The mail gets removed from the inbox as i would expect but i get an error email.<br /><br />LiveCycle ES has tried to process your request and encountered the following error:<br />Cannot coerce object: <document state="active" senderVersion="3" persistent="false" senderPersistent="true" passivated="false" senderPassivated="true" deserialized="true" senderHostId="127.0.0.1//10.64.128.161" callbackId="0" senderCallbackId="27" callbackRef="null" isLocalizable="true" isTransactionBound="false" defaultDisposalTimeout="600" disposalTimeout="600" maxInlineSize="65536" defaultMaxInlineSize="65536" inlineSize="2326" contentType="application/xdp" length="-1"><cacheId/><localBackendId/><globalBackendId/><senderLocalBackendId/><senderGl obalBackendId/><inline><?xml version="1.0" encoding="UTF-8"?> <?xfa generator="XFA2_4" APIVersion="2.6.7120.0"?> <xdp:xdp x...</inline><senderPullServantJndiName>adobe/idp/DocumentPullServant/adobejb_server1</se nderPullServantJndiName><attributes file="form_data.xdp"/></document> of type: com.adobe.idp.Document to type: class com.adobe.idp.taskmanager.form.impl.xfa.XFARepositoryFormInstance<br /><br />I had to set the mapping to *.xfa otherwise the email would just be ignored.<br />It seems to me that livecycle is not clever enough to pick up an email that its own form sent to the server.<br />Furthermore it would seem that an inbox must be unique for livecycle to pick up any submitted forms. That makes the whole send form to user thing worthless, since the form send to the user ALWAYS has the standard livecycle submit email address. That means per livecycle server you can have exactly one process that has an email endpoint for in process form submissions/reminders.<br />An email inbox should work exactly like watched folders, i.e. email patterns per workflow.

  • Creating an approval workflow for a customized request form

    Hello,
    I have created a customized request form in FIM that users are to fill up and submit for rights request. A workflow is required for for request process from the requester an escalation of approvers for the request to be approved or denied.
    My challenges are:
    Adding a control to my xml configuration file that will allow users to select multiple items, a checkbox feature with a list of rights to apply for
    Creating a workflow for the customized request form, so that the approvers receive mail with the details filled on the form as the body text of the mail.?
    How can I achieve these? I will greatly appreciate your help.
    Regards,
    Josephine

    I would suggest you go through this walkthrough here:
    http://technet.microsoft.com/en-us/library/ee534919(v=ws.10).aspx 
    and this is also very helpful:
    http://blog.msresource.net/2012/07/13/including-who-approved-or-rejected-an-approval-in-its-notification-email/
    - You need an email template with all your custom content
    - you need a notification workflow containing the recipient Information  
    - you need a MPR starting the workflow when the user checks the box
    - FIM needs to know the email attribute of the approver to be able to send the mail
    - the owner Attribute of the Group must be set, this is the recipient of the approval mail in case of the Default owner approval workflow. in your case you set the appropriate Attribute of the group
    - and of cause the Connection between FIM and Exchange must be available. If not, you see a lot of Errors and warnings in the eventlog.
    Henry

  • How to retrieve Request Form Data in OIM 11g for SOA workflows

    Hi,
    I have a business requirement wherein, I need to retrieve a field's value inside my SOA composite for further processing and decide on the Approver of the Request. Say for e.g. I'm having a field *"Country"* inside my Request Form, and what i need to do is, as soon as the request form is submitted, I need to retrieve the value for *"Country"* attribute inside my SOA Composite using Payload, and further process it. This scenerio is with respect to provision an application instance to a user.
    Now, in a similar scenario, where I was trying to create a user of type *"Contractor"*, I had used Request Service Api to retrieve the Basic information of the userform submitted, and decide on approval. Fortunately, the basic data like, First Name, Last Name, Login etc was successfully being fetched from the Request and I was able to perform further operations.
    Unfortunately, the same code which was working for Creation of a User, is not working when I'm trying to provision an application instance to the user.
    Below is the code which worked fine for me to retrieve basic request data for user creation, and isn't working for provisioning application instance:
    RequestService reqSvc = (RequestService)oimClient.getService(RequestService.class);
    String reqId = ((oracle.xml.parser.v2.XMLElement)getVariableData("inputVariable", "payload", "/ns3:process/ns4:RequestID")).getText();
    System.out.println("request ID: " reqId);+
    Request req = reqSvc.getBasicRequestData(reqId);
    List <RequestEntity> targetEntities = req.getTargetEntities();
    System.out.println("targetEntities : " targetEntities);+
    System.out.println("------------");
    for (RequestEntity rea : targetEntities)
    +{+
    List <RequestEntityAttribute> attributes = rea.getEntityData();
    for( oracle.iam.request.vo.RequestEntityAttribute attribute : attributes)
    +{+  
    System.out.println("Attribute.getName() : " attribute.getName().toString());+
         if(attribute.getName().equals("User Manager"))
         +{+
    beneficiaryManagerKey = attribute.getValue().toString();
         System.out.println("User Manager : " beneficiaryManagerKey);+
    +}+
         e+lse if(attribute.getName().equals("User Login"))+
         +{+
    userid = attribute.getValue().toString();
         System.out.println("User Login  : " userid);+
    +}+
    +}+
    +}+
    Any pointers to this would be of a great help.
    Regards

    List <RequestEntity> targetEntities = req.getTargetEntities();
    System.out.println("targetEntities : " + targetEntities);
    System.out.println("------------");
    The above piece of code retrieves the attributes and their values from the request form while creating a user, but not from the request form, which provisioning a resource to a user.
    Regards,

  • How do I create an email list sign up form for my iWeb website?

    Well that's the question - how do I create an email list sign up form for my iWeb website?
    Could someone tell me what's the simplest way using iWeb to create an interactive option
    for users to enter their email address and the info be forwarded to me so I can add to an
    email list?
    It would be great if, since I'm using a Mac computer & iWeb, there was a way to have the
    submitted emails automatically added to a group in my Mac Addressbook.
    I got this MacBook Pro in Sept 2010 so I believe that's iWeb '08 I'm using.
    Anyway I'm thinking there should be a way to do this with some system involving an HTMK
    Widget and an email account.
    By the way this is for hosting through a 'real server', not MobileMe (which I plan to get later
    when I can afford it).
    Any help or suggestions would be appreciated.
    Mark

    Website forms require some code in a snippet and a formmail.php script on the server to process the form and send the info to the required email address. You can do all this when you switch to a "real" server.
    In the meantime you can use a form  or marketing service or, better still, an application like MailShoot which generates the form, handles the database and sends out the bulk emails.
    "I may receive some form of compensation, financial or otherwise, from my recommendation or link."

  • Hi - I created a form in Adobe Livecycle and have a button on it to send the form via email.  the button did not work and i looked online and saw where you could change it to a regular button and enter the email for it to go.  it worked, but only for thos

    Hi - I created a form in Adobe Livecycle and have a button on it to send the form via email.  the button did not work and i looked online and saw where you could change it to a regular button and enter the email for it to go.  it worked, but only for those with adobe pro.  i could not get it to work with reader.  is there a way i can make it work for reader?

    Noted.
    The LiveCycle user to user forum is across town at:
    Adobe LiveCycle 
    Be well...

  • Today is April 10, 2013. I try to login to iTunes connect and I keep getting the message "An error has occurred processing your request. Please try again later or send an email for assistance." It never tells us what email address we need to write to.

    Today is April 10, 2013. I try to login to iTunes connect and I keep getting the message "An error has occurred processing your request. Please try again later or send an email for assistance." It never tells us what email address we need to write to.

    The problem was solved by Apple Technical Help. The process is as flollows:
    1. Open Safari
    2. Menu item Safari-Reset Safari - remove all website data - reset
    3. Now if you try to login on iTunes connect it will work.

  • How do I specify different emails for a form to send to based on different selections?

    How do I specify different emails for a form to send to based on different selections?
    Creating a form that can be sent to an email address is simple enoug but my problem I can't figure out.  There is a drop down menu on the form and based on what the user selects the form will be sent to 1 of 3 groups of email addresses.  How can I specify which group of email addresses belong to a particular dropdown menu selection?

    You can populate the drop down with a dataprovider that has the dropdown field and the emailgroup field.
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
      <mx:Script>
        <![CDATA[
          import mx.events.FlexEvent;
          import mx.collections.ArrayCollection;
          [Bindable] private var dataAC:ArrayCollection = new ArrayCollection([
            {label: "one", email: "[email protected]"},
            {label: "two", email: "[email protected]"},
            {label: "three", email: "[email protected]"},
          private function changeFunc(evt:FlexEvent):void{
            txt.text = evt.currentTarget.selectedItem.email;
        ]]>
      </mx:Script>
      <mx:ComboBox id="cmbx" dataProvider="{dataAC}" valueCommit="changeFunc(event)"
        labelField="label" creationComplete="cmbx.selectedIndex=0"/>
      <mx:Text id="txt"/>
    </mx:Application>
    If this post answers your question or helps, please mark it as such.
    Greg Lafrance - Flex 2 and 3 ACE certified
    www.ChikaraDev.com
    Flex / AIR Development, Training, and Support Services

Maybe you are looking for