Helps the function of class of SMTP with authentication

My server no longer supports the php mail() feature.  I need to use the SMTP class with the authentication function in my php code, and they suggested this to replace it: on-with-authentication-in-php-code http://www.yrhostsupport.com/index.php?/Knowledgebase/Article/View/101/2/smtp-class-functi

So, I tried, but cannot make it work. This is my test form:

< are method = "post" action = "forms/sendmail - test2.php" onsubmit = "return checkEmail (this);" >

< script type = "text/javascript" language = "JavaScript" >

< /script >

< fieldset > < legend > news < / legend >

< Label > name < / label >

< input type = "text".

name = "name" size = "30" maxlength = "40" / > < br / >

< label > < span class = 'redText' > * </span > Email < / label >

< input name = "email" type = "text" size = "30" maxlength = "40" / >

< br / >

< label > < span class = 'redText' > * </span > Message < / label >

< textarea cols = "40" rows = "5" name = "message" type = "text" / > < / textarea > < br / >

< / fieldset >

< input type = "reset" value = "Reset" / >

< input type = value = "submit" / >

< / fieldset >

< / make >

It's sendmail - test2.php where going to the form. It will not be sent unless I have comment on the first 10 lines.

<? PHP

include ('Mail.php');

//$to = " [email protected] "; "

$name = $_REQUEST ['name'];

$email = $_REQUEST ['email'];

$message = $_REQUEST ['name'];

$headers = "from: $email";

$subject = "price quote";

$fields = array();

$fields {'name'} = 'Name ';

$fields {'email'} = 'Email ';

$fields {'message'} = 'Message ';

$recipients = ' [email protected] '; //CHANGE

$headers ['from'] = ' [email protected] '; //CHANGE

["to"] = $headers ' [email protected] '; //CHANGE

$headers ['subject'] = 'Test Message';

$body = "test message";

Set the SMTP settings

$params ['host'] = "levy.dnsbox25.com";

$params ['port'] = '25';

$params ["auth"] = "PLAIN";

$params ["username"] = ' [email protected] '; //CHANGE

$params ["password"] = "xxxxxx"; CHANGE

/ Next option allows the SMTP debug and will print the SMTP Protocol

conversation on the page, it will help only with authentication problems. */

$params ['debug'] = 'true ';

Create the mail object using the Mail::factory method

$mail_object = & Mail::factory ('smtp', $params);

Print the parameters you use for the page

{foreach ($params as $p)

echo "$p < br / > ';

}

Send the message

$mail_object-> send ($recipients, $headers, $body);

? >

It used to work well when I used

$send = mail ($ $subject, $body, $headers);

$send2 = mail ($from, $subject2, $autoreply, $headers2);

But they said I can't use it anymore. I'm good with HTML and CSS, but I don't know much about php. Thanks for any help integrating one of in this new code!

It is to be expected. When you assign a value to a variable that was already assigned, you replace the previous value. You must add. Try this

$body = "name:". "." $name. "\r\n". "e-mail:". "."  $email. "\r\n". $message

Tags: Dreamweaver

Similar Questions

  • Helps the function 'Running background PL/SQL'

    Hello everyone.

    I come here for assistance with the service running background PL/SQL within the APEX. Here's a background of what I have to do.

    Background:

    Currently, I have just a page with a button above and some display boxes. The button calls a process flow Oracle Warehouse Builder (OWB) named RUN_ADJ_VAR and does what he must do. That works fine if my button simply calls the PL/SQL code of

    BEGIN

    ETQUEW. RUN_ADJ_VAR;

    END;

    Now that I know that the process flow and the button are working fine, I need to make the page "intelligently" by limiting multiple submissions until the process ends.

    What I need:

    I need assistance with running background PL/SQL function. My work has been running for a while and I need to run in the background and provide a status of the user, while restricting another presentation by the user. From what I've read here:

    Advanced programming techniques

    According to me, that this DBMS wrapper function, it's what I use.

    What I have so far:

    Using the API and example, I made my own attempt at this and it does not work. Here's what I have so far:

    [code]

    DECLARE

    v_sql VARCHAR2 (32767).

    BEGIN

    v_sql: = '

    BEGIN

    ETQUEW. RUN_ADJ_VAR;

    APEX_PLSQL_JOB. () UPDATE_JOB_STATUS

    P_JOB = >: APP_JOB,.

    P_STATUS = > "done");

    END IF;

    END;

    ';

    : P1_JOB: = APEX_PLSQL_JOB. () SUBMIT_PROCESS

    p_sql = > v_sql,

    p_when = > sysdate,.

    p_status = > 'Submit');

    : P1_POST_DONE: = 'Y ';

    END;

    [/ code]

    What the code so far:

    The code seems to ignore the first part and does work through the underlined only section. The work never appears to run and the button can be clicked several times.

    Other Options:

    I don't know if the function from PL/SQL background running is the only way to do that. The work is performed for about 15 minutes so I can't use a javascript script wait indicator since that will expire because of the hours of work. I searched all over the internet and forums and I feel I have exhausted all my options. I am very new to the APEX and PL/SQL in general, so your help is very appreciated.

    Thank you!!!

    Hello Konrad B.!

    Try to rewrite the code as shown below:

    DECLARE

    v_sql VARCHAR2 (32767).

    BEGIN

    v_sql: = '

    BEGIN

    ETQUEW. RUN_ADJ_VAR;

    END;

    ';

    : P1_JOB: = apex_plsql_job.submit_process (v_sql);

    END;

    Assume that P1_JOB - question on the page. After submitting the job, this point will be containing number of jobs. The job number,
    username (can get APP_USER) and workspace id (can get WORKSPACE_ID) you can check the status
    view of working level (field SYSTEM_STATUS) APEX_PLSQL_JOBS:

    SELECT SYSTEM_STATUS
    FROM APEX_PLSQL_JOBS
    WHERE JOB = :P1_JOB
    AND ANDUSER = :APP_USER
    AND SECURITY_GROUP_ID = :WORKSPACE_ID
    

    So you can make conditional button, selected example condition "NOT Exists (SQL query returns no rows)" and in the expression type:

    Select 1 from apex_plsql_jobs

    where employment =: P1_JOB

    and end user =: APP_USER

    and security_group_id =: WORKSPACE_ID

    and system_status in ("in PROGRESS", "SUBMITTED")

    If you must run the job for the user, then button will not be returned.

  • What is the right method to access the functions in a DLL compiled with a target of THIS (Arm)?

    I tried without success to access functions in a DLL that is meant for Windows CE.  My Labview application objective is a touchscreen the arm-based device.

    All, thank you very much for all your help.  I was still unable to find a method that did not produce an error when compiling... calls for a vi or a C file to be included.  (ex: [feature] is a missing file vi or C).  I also tried including the import library for the DLL, as shown above in the email from Paul, but I still received the same error.  This has been a problem for me, while testing with Win32 non-targets... in this case a device of THIS 5.0 touch screen based on the arm.

    However, I found a solution feasible and quite simple:

    Instead of trying to register the import library DLL as a file depending on the vi, I changed to build a DLL (and associated import lib) to build a static library (.lib) and included while .lib file as a dependent in the build specification.  This had the effect of linking statically, object code rather than wait for the vi compiler to compile the C source code or link a DLL import for a non-Win32 target library.  It is also not necessary to include an additional step in the installation of the DLL on the target device.  The library, I created is just a simple interface to another DLL already on the target device, which had struggled to interface directly to Labview.  Given that it is only a role of simple interface, this solution of library static woked well because it was not essential to have its available as a separately scalable DLL functions.

  • Error with the function "Open/create/overwrite file" with cancel button

    I have attached a very simple VI who embodies what I want to do with my function to open the file. I just want to stop the rest of my program (theoretically embedded in the Structure box) to run if the user deigns to do not to specify a file location.

    However, if you click on the button cancel an error is produced before the rest of the program is running. If ignore you the error and continue, the "canceled" properly true made variable and the Structure of business runs correctly. "" I just want to remove the error message given to me by LabVIEW.

    Any ideas on why or how?

    Read the help of LabVIEW on automatic error handling.

    In your case, you can just wire the output of cluster of error to the structure of your business.

  • Gah! Web site has the function which replaces Chr (10) with spaces

    Hello, everyone.

    I'm working on a site that has a function that will automatically replace all Chr (10) with spaces when a form is present. I can't prevent this being used.

    When a form with a textarea component is present, line all the jumps are replaced by spaces, destroying the formatting of what was originally submitted.

    When you pull of the text from a database, how are we going to rebuild line breaks and the restoration of the formatting?

    Thank you

    ^_^

    Optionally, use javascript to replace the lf characters before the form is submitted.  Replace all the lf characters with some other characters that you can later (on the side Server) replace in any character you want.

    I really don't like this solution, but it could work.  It feels good for me because it's just a hack to work around the problem.  I agree with Adam because I would try to remove the offending first software.  Or at least to stop depriving the lf characters.  Is - configurable as to what replaces it?

  • Use the function 'replace' dynamic pdf created with Livecycle designer javascript

    HI -.

    I created a multidisciplinary pdf form that includes a button that generates an email.  The body of the email contains the contents of the specified fields.  It all works very well.  The problem is that in one of the fields, a network path is entered.  When enamel is generated that information is included in the body of the email and, often, the connection that results is broken, because the path often contains spaces in the path name.  It seems that I can resolve this problem if the empty spaces in the path are replaced by %, for example, before you have users generate the email.

    How to create an event javascript that looks at the raw value of the field where the network path is stored and replace spaces by a % sign?

    Thank you very much in advance for your help!

    Here is a screenshot of the example. It is the event for tfFieldWithSpaces exit.

  • Tips for the TCP wait of asynchronous Messages with non-standard expression tanks

    Hi all

    I have a PITA instrument that I need to communicate with in a system of greater control.  This instrument communicates via RS232 to a server running on the PC OEM application.  In order to communicate with the instrument, I have to use the TCP protocol on a specific port on Localhost - So far so good as long the protcol is answer command.

    The problem is that the instrument sends several messages asynchronously of different sizes with a double newline as a tank of termination (there are many CR/LFS all these messages so that they cannot be a MOE) and I am struggling to find a way to manage receive asynchronous messages of variable length with a cusom CHARACTER term. without having simply a fast dedicated for TCP loop reads trying to catch these asynchronous status messages.

    I wish the functions VISA TCP has worked with the local host, given that the properties that can be set to change the chariot of non-standard term.

    Open to suggestions-

    Thank you

    Ronin

    Yes, I'll be streaming in my own string buffer and then to choose the messages out of the buffer when you find the stop character.

    A technique to improve performance, rather than reading a single byte at a time is to use the "immediate" on reading TCP mode and use a high value for the "bytes read" - in this way, it will return all of the data that is there without waiting for all the specified bytes or the time-out. He will wait only the full timeout if 0 bytes are received (which you can ignore) - set to a low value such as 100ms.

  • Proxy with authentication Client-side

    Hello

    How is the vWorkspace installation connector when the ClientSide a Proxy is activated with authentication?

    My problem is that the AppPortal cannot load the XML files with the following error:

    "xml document must have a top level element.

    When I download the XML file on the local disk that I can import the XML file, but the Application cannot be started. with the following error:

    "These data are incorrect."

    Need help.

    Thank you

    Jeje

    I discovered that the cause is a filter webcontent (DansGuardian) behind the proxy.

    When avoid us what the connection is working.

    Everyone knows with something like that?

  • 'The applet bad class name' exception when you try to save functional forms/EBS test with Oracle Open Script 12.2.0.1 in JRE 1.6.0_45

    Hello

    I have a problem when you try to save functional forms/EBS test with OpenScript in 12.2.0.1 and also 12.1.0.2 version.

    The problem has been verified in two environments:

    1. Windows XP 32-bit, Internet Explorer 7, 1.6.0_45 JRE.

    2. Windows 7 32 bit, Internet Explorer 8, 1.6.0_45 JRE.


    The exception that I can see in the Java Console is:

    ...

    SSV dialogue is removed

    Loading of ATS Oracle Forms Module functional test [5.5] [JRE_1.6.0_45 Oracle]

    Temporary directory FormsFT Helper: * \Temp\OpenScript_FormsFT

    ...

    Loading cached forms pots...

    ....

    oracle.forms.engine.Main cracked

    Base: exception: the applet Bad class name.

    exception: the applet Bad class name.

    java.lang.SecurityException: applet Bad class name

    at sun.plugin2.applet.Plugin2Manager.createApplet (unknown Source)

    to sun.plugin2.applet.Plugin2Manager$ AppletExecutionRunnable.run (unknown Source)

    at java.lang.Thread.run (unknown Source)

    Exception: java.lang.SecurityException: applet Bad class name

    I think that I already tried all possible combinations with options and preferences of OpenScript.

    I also reinstalled several times to JRE.

    What is interesting is that everything works fine when I use the 1.6.0_38 JRE. However, all versions up to it give me the above exception.

    Could you please give me some advice what I can do or check? Maybe you can provide me with some information about the things that have changed in JRE 1.6 update 38 which can affect the load java applets by OpenScript?

    Everything I could find in the release notes was that some security problems have been repaired.

    Thanks in advance for any help.

    Because of security changes introduced in JRE, use NO build longer than 38 for JRE 6 (1.6.0_38) and does not exceed the 11 for JRE (1.7.0_11) 7.

    REDA

  • After you download the security update 2015-008 I lost the function of the function keys and some other functions. Have already played with the keyboard f nothing helps. Are also past system on and outside...

    After you download the security update 2015-008 I lost the function of the function keys and some other functions. Have already played with the keyboard f nothing helps. Are also past system on and outside... need help pls

    PS noticed the update downloaded twice

    disregard my previous question... I found the answer: F1, F2 has been ticked on.

  • Upgrade to LR5.7 and PS Elements 13.  With the help of an SSD that is more complete! Can I remove older versions of these programs without affecting the functionality of the new programs?

    Upgrade to LR5.7 and PS Elements 13.  With the help of a Solid State Drive, which is more complete! Can I remove older versions of these programs without affecting the functionality of the new programs?

    Yes, there is no need to keep older versions of the software on the SSD (or your computer).

    In addition, you mentioned but if the photos are on the SSD, you must move them off the SSD for a typical hard drive, by following these instructions: Adobe Lightroom - find folders and files moved or missing

  • Need help with the function

    First off the coast to let put me the warning that I am not the right Wick informed in PL/SQL. I use this for an example posted in the forum of the APEX.

    I need the function to return values based on the user role. I know, it's probably the ugliest pl/sql, you may have seen yet ;) I hope that you guys can decipher the logic that I use. Obviously, this code does not validate.

    You guys could help me with this?

    FUNCTION to CREATE or REPLACE return_art_lov_fn
    RETURN art_table_type
    AS
    v_data art_table_type: = art_table_type ();
    BEGIN
    IF
    EXISTS (SELECT ' 1' FROM GBL_PEOPLE, GBL_ACCESS WHERE upper (gbl_people.userid) = upper (app_user) AND gbl_people.person_id = gbl_access.person_id and gbl_access.art_role = 9)
    THEN
    FOR c IN (SELECT reverse_name, person_id
    OF gbl_people)
    LOOP
    v_data. EXTEND;
    v_data (v_data. (COUNTY): = art_rectype (c.person_id, c.reverse_name);
    END LOOP;
    ON THE OTHER
    FOR c IN (select reverse_name, person_id of GBL_PEOPLE where upper (userid) = upper (APP_USER) and current_flag is not null
    Union
    Select reverse_name, person_id from GBL_PEOPLE where mgr_person_id = (select person_id in GBL_PEOPLE where upper (userid) = upper (APP_USER) and)
    (current_flag is not null) and current_flag is not null)
    LOOP
    v_data. EXTEND;
    v_data (v_data. (COUNTY): = art_rectype (c.person_id, c.reverse_name);
    END LOOP;
    ENDIF;
    RETURN v_data;
    END;

    -Vinod

    My guess is that you want something like

    CREATE OR REPLACE FUNCTION return_art_lov_fn
      RETURN art_table_type
    AS
      v_data art_table_type;
      l_cnt    integer;
    BEGIN
      SELECT 1
        INTO l_cnt
        FROM dual
       WHERE EXISTS(
          SELECT 1
            FROM gbl_people p,
                 gbl_access a
           WHERE upper( p.userid ) = upper( app_user )
             AND p.person_id       = a.person_id
             AND a.art_role        = 9
       );
    
      IF( l_cnt = 1 )
      THEN
        SELECT art_rectype( person_id, reverse_name )
          BULK COLLECT INTO v_data
          FROM gbl_people;
      ELSE
        SELECT art_rectype( person_id, reverse_name )
          BULK COLLECT INTO v_data
          FROM (SELECT person_id, reverse_name
                  FROM gbl_people
                 WHERE upper(userid) = upper(app_user)
                   AND current_flag is not null
                UNION
                SELECT person_id, reverse_name
                  FROM gbl_people
                 WHERE mgr_person_id = (SELECT person_id
                                          FROM gbl_people
                                         WHERE upper(userid) = upper( app_user )
                                           AND current_flag is not null)
                   AND current_flag is not null);
      END IF;
    
      RETURN v_data;
    END;
    

    If this does not work (I do not have definitions table, so I can't try to compile it myself), please report all errors of compilation (including line numbers).

    Justin

  • For the years FF has worked perfectly with constant Contact. Now, the sevear in CC function will not work in FF browser - they work in all other browsers. Help

    Until a week ago, I had no difficulty or problems work permanent Contact all open in my Firefox browser. Now, I have several with certain functions in CC does not.

    Inserting images, links setting, background color change - these are three necessary functions I use in emails from constant Contact which will stop working at the opening of the CC in the Firefox browser - last updated was today 29/10/2013.

    The function works on Chrome and Internet Explorer browsers.
    I contacted the Support in permanent Contact and the issue is not through their program.

    Safe mode is a troubleshooting mode, it checks to see if Addons or bad prefs are the problem, if safe mode resolves, you will maybe uninstall some addons or reset firefox (bookmarks of Guard etc..)

    SEE: troubleshoot and diagnose problems of Firefox and Firefox Refresh - reset the parameters and modules

    Note the reset feature is NOT a complete reset, so backup information is optional (only the prefs, Addons and a few custom mods will be lost)

  • With the help of function "Edit in" after the upgrade to 4.4 LR

    Hi all

    I upgraded to 4.4 today and when I tried to use the function "change in" on a photo of a move to 10 items, I received a message that LR has been unable to prepare the file selected for editting and it won't open.  I tried several photos and none of them work.  Also, I went into preferences and put in place the item editor as my external program.  It worked this morning before the upgrade.  Any ideas?

    To the OP, it is a kind of problem of permissions with the external hard drive for sure. Run repair permissions in disk utility and check the permissions to get information for the reader.

    Xda... the Edit function has always worked with PS or PSE depending on your configuration.

  • Access the function of the other class Document class

    I have this Enemy.as code that calls a function playerTurn() in Main.as, which is also the document class.

    var rootRef:Main;

    rootRef.playerTurn ();

    This is playerTurn()

    public void playerTurn(): void {}

    player_turn = true

    menu = battle_men

    menu.attackBtn.addEventListener (MouseEvent.CLICK, atkClicked);

    }

    After this code runs, I get

    TypeError: Error #1009: cannot access a property or method of a null object reference.

    at CharacterClasses::Enemy/initEnemyTurn() [C:\Users\***\Documents\SonicUltimateSceneCreat or\CharacterClasses\Enemy.as:23]

    Line 23 Enemy.as is rootRef.playerTurn ();

    Why I get this error?

    I got it.

    Object (parent) .playerTurn () worked well, but the function in which this line was performed was based on an event listener, as follows

    public void initEnemyTurn(evt:Event):void {}

    removeEventListener (Event.ENTER_FRAME, initEnemyTurn);

    player_turn = Main.player_turn;

    {if (player_turn)}

    addEventListener (Event.ENTER_FRAME, initEnemyTurn);

    }

    else {}

    Object (parent) .playerTurn ();

    }

    }

    initEnemyTurn is attached to an ENTER_FRAME listener, which was not readded in the else statement, thereby breaking the code.

    The reason why it was delete in the first line of initEnemyTurn is so does not run twice while the first tries to determine the player_turn.

    So it turns out that none of this had to do with the access to the function...

    Thanks for the help!

Maybe you are looking for

  • Lost bookmarks and passwords

    I have windows xp on my system and kept getting the blue screen of death, so I had to reinstall the operating system.I went in the region that stores the records firefox and thunderbird and saved on another drive.I reinstalled windows and then transf

  • Audiobook download not

    Hello I'm traveling abroad, and yesterday I bought the second book in a series of audio book. Download stayed greyed all yesterday, but my wifi access was questionable, so I don't think anything of it. Today, I have access, but in iBooks download rem

  • Loss of sound after IDT High Definition Audio Codec update.

    HP Support Assistant says that a new driver IDT HI Def Codec is available, so I downloaded and installed 6.10.6417.0, after which I have no audio output. I don't know which driver version was installed before the upgrade, but I have since downloaded

  • This plug-in that follows does not: Java (TM) platform SE 6 U21, would you like to stop it?

    Original title: Java Unresponsive Hello, I run this game using Java and I played this game for some time now and then displays this message saying "this plug-in that follows does not: Java (TM)" platform SE 6 U21, do you want to stop? '. " Will you p

  • the sound on my windows xp needs repair

    the sound on my windows xp desktop computer, sounds like pinky & perky How do I solve this problem