• 19-07-2021, 22:36:36
    #1
    Üyeliği durduruldu
    PHP Mailler kurdum, form çalışıyor ama mail atmıyor içeriği
  • 19-07-2021, 22:37:41
    #2
    Sorun nedir? Kodlarınızı da eklerseniz daha iyi olur.
  • 19-07-2021, 22:37:56
    #3
    k44n adlı üyeden alıntı: mesajı görüntüle
    PHP Mailler kurdum, form çalışıyor ama mail atmıyor içeriği
    Biraz daha detay verebilir misin?
  • 19-07-2021, 22:39:13
    #4
    Aldığınız hatayı buraya atarmısınız ? Eğer hata çıkmıyorsa else bloğuna $mail->ErrorInfo; yapıştırın ve tekrar göndermeyi deneyin. Ardından hata çıkacaktır..
  • 19-07-2021, 22:39:20
    #5
    Üyeliği durduruldu
    ibocum adlı üyeden alıntı: mesajı görüntüle
    Sorun nedir? Kodlarınızı da eklerseniz daha iyi olur.
    <?php
    
        $mail = $_POST['email'];
    
        $to = "aaaaaa@gmail.com";/* YOUR EMAIL HERE */
        $subject = "Job application from Potenza";
        $headers = "From: İş başvurusu";
    
        $message  = "PRESENTATION\n";
        $message .= "\nFirst and Last Name: " . $_POST['name'];
        $message .= "\nEmail: " . $_POST['email'];
        $message .= "\nTelephone: " . $_POST['phone'];
        $message .= "\nGender: " . $_POST['gender'];                
        
        /* FILE UPLOAD */
        if(isset($_FILES['fileupload'])){
        $errors= array();
        $file_name = $_FILES['fileupload']['name'];
        $file_size =$_FILES['fileupload']['size'];
        $file_tmp =$_FILES['fileupload']['tmp_name'];
        $file_type=$_FILES['fileupload']['type'];
        $file_ext=strtolower(end(explode('.',$_FILES['fileupload']['name'])));
    
        $expensions= array("pdf","doc","docx");// Define with files are accepted
                                  
        $OriginalFilename = $FinalFilename = preg_replace('`[^a-z0-9-_.]`i','',$_FILES['fileupload']['name']); 
        $FileCounter = 1; 
        while (file_exists( 'upload_files/'.$FinalFilename )) // The folder where the files will be stored; set the permission folder to  0755. 
               $FinalFilename = $FileCounter++.'_'.$OriginalFilename; 
    
            if(in_array($file_ext,$expensions)=== false){
                $errors[]="Extension not allowed, please choose a .pdf, .doc, .docx file.";
            }
            // Set the files size limit. Use this tool to convert the file size param https://www.thecalculator.co/others/File-Size-Converter-69.html
            if($file_size > 953600){
                $errors[]='File size must be max 150Kb';
            }
            if(empty($errors)==true){
                move_uploaded_file($file_tmp,"upload_files/".$FinalFilename);
                $message .= "\nResume: http://www.yourdomain.com/upload_files/".$FinalFilename; // Write here the path of your upload_files folder
            }else{
                $message .= "\nFile name: no files uploaded";
                }
            };
            /* end FILE UPLOAD */
    
            $message .= "\n\nWORK AVAILABILITY";
            $message .= "\nAre you available for work: " . $_POST['availability'];
    
            if (isset($_POST['minimum_salary_full_time']) && $_POST['minimum_salary_full_time'] != "")
                {
                    $message .= "\nMinimum salary: " . $_POST['minimum_salary_full_time'];
                    $message .= "\nHow soon would you be looking to start? " . $_POST['start_availability_full_time'];
                    $message .= "\nAre you willing to work remotely? " . $_POST['remotely_full_time'];
                }
            if (isset($_POST['minimum_salary_part_time']) && $_POST['minimum_salary_part_time'] != "")
                {
                    $message .= "\nMinimum salary: " . $_POST['minimum_salary_part_time'];
                    $message .= "\nHow soon would you be looking to start? " . $_POST['start_availability_part_time'];
                    $message .= "\nWhen you prefer to work? " . $_POST['day_preference_part_time'];
                }
            if (isset($_POST['fixed_rate_contract']) && $_POST['fixed_rate_contract'] != "")
                {
                    $message .= "\nMinimum fixed rate: " . $_POST['fixed_rate_contract'];
                    $message .= "\nMinimum hourly rate: " . $_POST['hourly_rate_contract'];
                    $message .= "\nMinimum hours for a contract: " . $_POST['minimum_hours_conctract'];
                    $message .= "\nAre you willing to work remotely? " . $_POST['remotely_contract'];
                }
                            
            $message .= "\n\nTerms and conditions accepted: " . $_POST['terms'];
                                                    
            //Receive Variable
            $sentOk = mail($to,$subject,$message,$headers);
                            
            //Confirmation page
            $user = "$mail";
            $usersubject = "Thank You";
            $userheaders = "From: Job application from Potenza <noreply@yourdomain.com>";
            /*$usermessage = "Thank you for your time. Your quotation request is successfully submitted.\n"; WITHOUT SUMMARY*/
                            
            //Confirmation page WITH  SUMMARY
            $usermessage = "Thank you for your time. Your application is successfully submitted. We will reply shortly.\n\nBELOW A SUMMARY\n\n$message"; 
            mail($user,$usersubject,$usermessage,$userheaders);
        
    ?>
    Kodlar bunlar mail php mailler framework da ekledim, smtp bilgiside girdim ilave yaptım ama formu atıyor maile düşmüyor bozuk
  • 19-07-2021, 22:41:11
    #6
    Gmail icin “allow less secure apps” i açmanız gerekiyor
  • 19-07-2021, 22:41:39
    #7
    Üyeliği durduruldu
    FidanAtug adlı üyeden alıntı: mesajı görüntüle
    Aldığınız hatayı buraya atarmısınız ? Eğer hata çıkmıyorsa else bloğuna $mail->ErrorInfo; yapıştırın ve tekrar göndermeyi deneyin. Ardından hata çıkacaktır..
    Herhangi bi hata vermiyor
  • 19-07-2021, 23:26:10
    #8
    k44n adlı üyeden alıntı: mesajı görüntüle
    Herhangi bi hata vermiyor
    Hata yoksa başka bir problem vardır. Sadece mail göndermeye çalışın. Dosya yüklemeyi çıkarın hocam.
  • 19-07-2021, 23:36:23
    #9
    Üyeliği durduruldu
    @dahauzman; Arkadaşımız sağolsun çözdü, işinin ehli profesyonel php uzmanı resmen kendisine çok teşekkür ediyorum