5 Configure sendmail on xampp! Use any email account to send mail from Xampp!

Поділитися
Вставка
  • Опубліковано 19 вер 2024
  • ATTENTION! UPDATED VIDEO
    If anyone is having problem in sending mail then you can try changing the SMTP port to 465.
    The fix of not getting email is here • FIX! Xampp not sending...
    Watch this video if you can't successfully send email.
    Hi, guys in this video you will see how you can send emails from xampp. You can use any email account to send mail from xampp. Watch this video until the end.
    CODE:
    ------------------------------------------------
    php.ini file
    SMTP=smtp.gmail.com
    smtp_port=587
    sendmail_from = mail@gmail.com
    sendmail_path = "\"C:\xampp\sendmail\sendmail.exe\" -t"
    -----------------------------------------------------
    sendmail.ini file
    smtp_server=smtp.gmail.com
    smtp_port=587
    error_logfile=error.log
    debug_logfile=debug.log
    auth_username=mail@gmail.com
    auth_password=yourpassword
    force_sender=mail@gmail.com
    -----------------------------------------------------
    PHP file code
    "angle bracket open"?php
    //the subject
    $sub = "Your subject";
    //the message
    $msg = "Your message";
    //recipient email here
    $rec = "example@gmail.com";
    //send email
    mail($rec,$sub,$msg);
    ?"angle bracket open"
    ----------------------------------------------------------------------------
    I am also available on :
    Facebook: / devansab9
    Quora: www.quora.com/...
    Twitter: / devansab9

КОМЕНТАРІ • 218

  • @kirthikopalle
    @kirthikopalle 3 роки тому +1

    all the videos ive seen till now this is the best one out of all...lot of explaining done which was was very useful for understanding what to do..10/10

  • @lifecheckbaliwag3398
    @lifecheckbaliwag3398 2 роки тому +1

    THANKYOU SO MUCH BROTHER!! IT WORKS!!!!! I can't express how much happy I am when I finally saw the result of my thesis project. After a half day of finding this kind of video, THANKYOUSOMUCH!!!

  • @azeemhussain1109
    @azeemhussain1109 4 роки тому +1

    after watching udemy lec from 5 days even unbale to send my msg from local host to email.
    Then I came to your video, and a very big thanks to you bro . I did same within 15 minutes. its working perfectly.
    Many many thanks to you bro.
    Btw one more subscriber have joined your channel. :-)

    • @long5603
      @long5603 4 роки тому

      where did you base your SMTP Port?

  • @martymcmillan22
    @martymcmillan22 5 років тому +1

    It worked for me after i adjusted my email security(temporarily of course). I went to my spam and saw a security alert. I then followed link to adjust. Thanks for help!

  • @desmondnkwain9882
    @desmondnkwain9882 4 роки тому +1

    Thanks,after changing the smtp port to 465, everythx went perfectly

  • @chaithrag802
    @chaithrag802 4 роки тому

    Thanks a lot Bro for this video. I was trying to execute this function from 2 days and saw lots of video.. But couldn't find the right method. This is the best video. thank you once again..

  • @sumangalidigitals5514
    @sumangalidigitals5514 4 роки тому

    Fantastic. Its working with port 465 for me. It blocked from google initially but i changed the settings to allow from low apps.

  • @eleanorcarl2056
    @eleanorcarl2056 5 років тому +9

    What to do if google mail is blocking your incoming mail,' it isn't from a trusted platform? There are no google settings to change on the email side. * Critical security alert! Sign-in attempt was blocked *

    • @allyjohn3656
      @allyjohn3656 4 роки тому +1

      from the mail google has sent for you, click the check activity button and go for Allow less secure apps: ON, once u made it on access will be allowed

  • @sayandhara962
    @sayandhara962 4 роки тому +1

    nice tutorial... make more videos in php topic like how to secure php based websites etc... that will helpful to us..

  • @heal584
    @heal584 Рік тому +1

    I did this , and it shows that my email is sent but I'm not receiving the email. What will I do?

  • @VisualArts007
    @VisualArts007 4 роки тому

    so finally worked after this tutorial..........thanks man

  • @allenjoshua7692
    @allenjoshua7692 2 роки тому

    thank you so much!! very easy to follow and worked on my first try!

  • @krupeshkd2565
    @krupeshkd2565 Рік тому

    Nice work bro🤙🤙
    Thank you

  • @fayaazmohamed7320
    @fayaazmohamed7320 3 роки тому

    Thank you for the video bro ,i have refered to many videos and tutorial nothing helped me out only your video helped me
    thanks a lot

    • @mohammedhusain6446
      @mohammedhusain6446 2 роки тому

      6:29 where we can write our password here? Plz tell me ..my mail function show no errors but dont send mail eighter

  • @anggaekapurnama9957
    @anggaekapurnama9957 4 роки тому

    Thank you, very much. I have been solved my problem with this video

  • @PradeepYadav1991
    @PradeepYadav1991 3 роки тому

    10/10 Keep up the good work!

  • @renhaorh
    @renhaorh 4 роки тому

    thank you so much for this informative video

  • @kshirjamakar4285
    @kshirjamakar4285 5 років тому

    this video helped me a lot ....... thank you so much

  • @samuelmuriuki6584
    @samuelmuriuki6584 5 років тому

    Thanks a lot. I have watched watched my videos on this top but this one is superb. Thank you very much

    • @samuelmuriuki6584
      @samuelmuriuki6584 5 років тому

      Hello there. I think i have another problem i hope you have a solution. Yesterday after I did perfectly the same as it is in you video and actually it worked. But today i have tried to send email but it seems not to work and all my files are just the same as they were when i was sending yesterday.When i check the error.log file i says 'Connection Closed Gracefully'. Please help if you have any solution

    • @DevAnsab
      @DevAnsab  5 років тому

      Run apache as administrator. If that dosen't work. Then in sendmail.ini file change smtp_ssl = auto to "ssl" or "tls" or "none" according to server. But dont use "smtp_ssl=auto".
      Let me know if it works.

  • @n0wa979
    @n0wa979 4 роки тому

    You saved my school project

  • @prakashboul8812
    @prakashboul8812 3 роки тому

    Thank you bro ur video is very help full

  • @shroob731
    @shroob731 2 роки тому

    Got me working! Thanks!

  • @bhagabatiprasad2612
    @bhagabatiprasad2612 4 роки тому

    Thank you bro. It worked. It helped me a lot.

  • @allyjohn3656
    @allyjohn3656 4 роки тому

    good, it's helpful broo, it has worked for me. appreciate

  • @jeetbhatt5986
    @jeetbhatt5986 4 роки тому

    Thanks a lot bro.....
    You're great.

  • @angonabiswas4664
    @angonabiswas4664 5 років тому +1

    Before the xampp setting there was showing error. but now error or warning is not showing but mail does'n come yet.

    • @DevAnsab
      @DevAnsab  4 роки тому

      You can try changing the SMTP port to 465. If it doesn't work try 587.

  • @FroilanQSulit
    @FroilanQSulit 4 роки тому

    Thanks a lot it really helpful

  • @abdullahmoamen9227
    @abdullahmoamen9227 4 роки тому +1

    big thanx buddy

  • @calebgarmon1
    @calebgarmon1 5 років тому

    Actually saved me so much time in configuring XAMPP for mail use. 10/10

  • @1gurugraphics
    @1gurugraphics Рік тому

    Very good video

  • @karthickramkrish6548
    @karthickramkrish6548 4 роки тому

    Thanks much dude....its working😻

  • @vandhusriraja5809
    @vandhusriraja5809 5 років тому

    Thanks alot bro...ITS WORKING

  • @ellybabun
    @ellybabun 3 роки тому

    it works! thank you so much!

  • @mokbulhussain9397
    @mokbulhussain9397 4 роки тому

    bai thank you.great tutorial

  • @alihaj6123
    @alihaj6123 Рік тому

    it works , thank you

  • @YaaALI313
    @YaaALI313 4 роки тому

    nice job thanks!!!!!!!!!!!!!!!!!!

  • @arunachalam7719
    @arunachalam7719 Рік тому

    thank you so much

  • @anisfathima7185
    @anisfathima7185 4 роки тому

    It works.. Thank you.

  • @ramansharma9678
    @ramansharma9678 5 років тому

    Thanks a lot!!!

  • @saintilienwilson2386
    @saintilienwilson2386 4 роки тому

    Good.. it's work correctly

  • @ilmustudio4364
    @ilmustudio4364 3 роки тому

    thanks a lot

  • @pranavlabdhe4657
    @pranavlabdhe4657 4 роки тому

    thanks man!!!

  • @payalkothari4862
    @payalkothari4862 3 роки тому

    Thankuu so much...

  • @jamesrobertsalud1443
    @jamesrobertsalud1443 5 років тому

    Thank you very Much, It Works

  • @javicov9118
    @javicov9118 4 роки тому

    THANK YOU BROOOOOOO !!

  • @SAFEDRIVEIND
    @SAFEDRIVEIND 4 роки тому

    Brother I got successful sent information but email is not arriving in mailbox even though checked in spam and turned on LESS SECURE APP so what might be the issue??

    • @DevAnsab
      @DevAnsab  4 роки тому

      ua-cam.com/video/L5uCc8Hab-I/v-deo.html
      Please watch this updated video.

  • @amalchebri7726
    @amalchebri7726 4 роки тому

    tks for this video broo

  • @testing1343
    @testing1343 5 років тому

    you are a genius

  • @edgarmoturi
    @edgarmoturi 5 років тому +1

    No mail was sent to my account. Still wondering how the other guys managed it. I've followed the steps but to no avail. Kindly help!!!!!

    • @ricardoplateros2579
      @ricardoplateros2579 5 років тому

      same problem thou. cant access or worked error says username and password not accepted. bla bla bla shit

    • @DevAnsab
      @DevAnsab  4 роки тому

      You can try changing the SMTP port to 465. If it doesn't work try 587.

  • @Gabsz182
    @Gabsz182 5 років тому

    Thank you bro!

  • @Diego4322237
    @Diego4322237 4 роки тому

    mil gracias!!!!

  • @tukuyoma
    @tukuyoma 4 роки тому

    thank you it helped

  • @karishmabhoir6715
    @karishmabhoir6715 5 років тому +1

    Warning: mail() [function.mail]: "sendmail_from" not set in php.ini or custom "From:" header missing in C:\xampp\htdocs\email_verification\checkmail.php on line 5 error. plz help

    • @DevAnsab
      @DevAnsab  5 років тому

      Check the entries in mail function in php.ini file

  • @diydoityourself3882
    @diydoityourself3882 3 роки тому

    Nice

  • @xenoeovo649
    @xenoeovo649 5 років тому +1

    Warning: mail(): Failed to connect to mailserver at "localhost" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() in C:\xampp\htdocs\checkmail.php on line 8

    • @DevAnsab
      @DevAnsab  5 років тому

      I think there is something wrong with your smtp settings.
      If you are using gmail then use smtp.gmail.com in smtp setting on both files.

    • @xenoeovo649
      @xenoeovo649 5 років тому +2

      Never mind it's working. Appears i didn't restart my XAMPP.
      Thank you very much. You just saved me my job!

    • @DevAnsab
      @DevAnsab  5 років тому

      Welcome 😆

    • @fataidea135
      @fataidea135 5 років тому

      Thats the error am also having here, pls how can i resolve it ??

    • @eleanorcarl2056
      @eleanorcarl2056 5 років тому

      I also reset my xampp and it worked, I also made sure that it was administrator mode. Also careful that you don't disable or any doubled up contradicted code.

  • @1112GT
    @1112GT 5 років тому +1

    Thanks, the solution is straightforward. However, before the xampp setting suggested, it was showing error. but now error or warning but mail is not sent. I waited for more than a day, restarted xampp and rechecked the codes you recommended. Please help. The localhost/checkingmail.php is blank and no e mail as well as been triggered.

    • @DevAnsab
      @DevAnsab  4 роки тому

      You can try changing the SMTP port to 465. If it doesn't work try 587.

  • @bgseenivasababu7191
    @bgseenivasababu7191 4 роки тому

    Thanks

  • @vikrntmane8132
    @vikrntmane8132 4 роки тому

    nice work

  • @ziakhan-wr4gs
    @ziakhan-wr4gs 2 роки тому

    great

  • @zansiviradiya5387
    @zansiviradiya5387 2 роки тому

    Email has been send successfully. But not show in my inbox. I was changed all of the setting

  • @sandeepkashyap3171
    @sandeepkashyap3171 4 роки тому

    thnxxx bro

  • @priyapogula6715
    @priyapogula6715 4 роки тому

    sir
    how to send mail's for multiple users with different content, like each person data which is stored in xampp should be sent to their mail's using php?

  • @mindydean7790
    @mindydean7790 3 роки тому

    what's the difference in using a mass envoy program to use this?

  • @andresbonilla1622
    @andresbonilla1622 5 років тому

    amazing thx

  • @nightowlegg3932
    @nightowlegg3932 5 років тому

    Hello! I kind of need some help. Mine says that it worked, but nothing actually sent. What should I do? To test, I added this below the mail function:
    if (mail($rec, $sub, $msg))
    {
    echo "Message accepted";
    }
    else{
    echo "Error: Message not accepted";
    }
    It will say that the message was accepted, but nothing actually happened. I checked the spam folder as well and nothing is there either.

    • @DevAnsab
      @DevAnsab  5 років тому

      May be something wrong from email service side.

  • @richardnwachukwu187
    @richardnwachukwu187 5 років тому +1

    i didn't recieve mail, what could be the cause

    • @DevAnsab
      @DevAnsab  4 роки тому

      You can try changing the SMTP port to 465. If it doesn't work try 587.

  • @Dileep-bb3uq
    @Dileep-bb3uq 5 років тому

    tnq it's working

  • @ashikmdshakil5622
    @ashikmdshakil5622 5 років тому

    thank u

  • @panosalexopoulos1491
    @panosalexopoulos1491 4 роки тому

    i try to do that .. but didt work
    my windows is 64bits ... its thar a problem?

  • @rii3534
    @rii3534 2 роки тому

    why on my laptop there is no sendmail file?

  • @saurabh7794
    @saurabh7794 4 роки тому

    I used the same procedure but didn't succeed. There is neither any error nor mail sent.

  • @bicavalgyalvesdesousa2526
    @bicavalgyalvesdesousa2526 3 роки тому

    I can't see c:\\xampp\sendmail directory how can I get it?

  • @saeedalshahranii7221
    @saeedalshahranii7221 4 роки тому

    The email was sent but unfortunately, Gmail blocked it so no mail came in the box. It says Sign-in attempt was blocked.

    • @DevAnsab
      @DevAnsab  4 роки тому

      See this update method ua-cam.com/video/L5uCc8Hab-I/v-deo.html

  • @albanbardhi4906
    @albanbardhi4906 4 роки тому

    Have need to seto our email adress to .ini files?

  • @yasheshpatel3605
    @yasheshpatel3605 5 років тому

    Username and Password not accepted. i have an error this. I have enter right credential but i have an error on this Username and Password not accepted

  • @happyy6826
    @happyy6826 3 роки тому

    Nice video! How is it that my Xampp doesn't have an sendmail.ini

    • @DevAnsab
      @DevAnsab  3 роки тому

      Have you installed all the components during installation?

    • @happyy6826
      @happyy6826 3 роки тому

      @@DevAnsab Oh I'm not too sure, how do I install the rest of the components?

  • @seejansunar
    @seejansunar 4 роки тому

    Warning: mail(): SMTP server response: 530 5.7.0 Must issue a STARTTLS command first. b23sm8676089pfo.62 - gsmtp in C:\xampp\htdocs
    egistration\sending_mail.php on line 9
    Email sending failed...
    How to solve this particular problem?

    • @DevAnsab
      @DevAnsab  4 роки тому

      Please try changing port to 465

  • @hygisonbrandao9251
    @hygisonbrandao9251 3 роки тому

    If I could give 2 likes, I would!

  • @urvipatel5792
    @urvipatel5792 4 роки тому

    mail(): "sendmail_from" not set in php.ini or custom "From:" header missing in
    how to solve this type of error

    • @DevAnsab
      @DevAnsab  4 роки тому

      See the code of php.ini file in description section and set a valid email address in sendmail_from field.
      I think you didn't put your email id in sendmail_from field.

  • @kurapatiakhilkumar5314
    @kurapatiakhilkumar5314 4 роки тому

    should we install fake send mail? when installing xampp

  • @mahdiceddo4205
    @mahdiceddo4205 4 роки тому

    I GOT THE PROBLEM !!! U HAVE TO COMMENT THE LINE WHiCH CONTAINTs extension=php_ftp.dll by using a ;

  • @m.prabhakaranam.prabha5305
    @m.prabhakaranam.prabha5305 3 роки тому

    this is my error
    : mail(): Bad Message Return Path in on line

  • @karmaindustrie
    @karmaindustrie 5 років тому +1

    you forgot the php code in the video description

    • @DevAnsab
      @DevAnsab  5 років тому

      Thanks will update it soon.

  • @kritiseth2343
    @kritiseth2343 5 років тому

    but i dont have a send mail folder in my xampp folder.What to do??

    • @DevAnsab
      @DevAnsab  5 років тому

      I think you need to uninstall xampp completely and then reinstall it. I think your installation was not properly done.

  • @felmetaabate7484
    @felmetaabate7484 5 років тому

    sir didnot send the email,
    i use some if else condition for success .
    here is my code:
    if(mail($rec,$sub,$msg))
    {
    echo "success";
    }
    else
    {
    echo "fail";
    }
    i did all what you do ...pls help

    • @DevAnsab
      @DevAnsab  5 років тому

      Is it working without if else

    • @felmetaabate7484
      @felmetaabate7484 5 років тому

      is not working.......i think SMTP protocol is blocked in our university, how can i correct

  • @oumaimasouid1055
    @oumaimasouid1055 4 роки тому

    i didn't find the folder sendmail in folder xampp
    what can i do ? help me please

    • @DevAnsab
      @DevAnsab  4 роки тому

      That's wierd, did you install all the components during xampp installation?

  • @blackshadow323
    @blackshadow323 4 роки тому

    I didnt become any error messages. But there are no emails on my account. I do it exactly like you

    • @DevAnsab
      @DevAnsab  4 роки тому

      Try using gmail application password. Search on Google for more.

  • @deepanshugarg3139
    @deepanshugarg3139 6 років тому

    Hey hii
    bro I am not able to send the mail. I have done the exact same thing as you have mentioned. Kindly help me.I have installed Xampp in my E drive.

    • @DevAnsab
      @DevAnsab  6 років тому

      So as you have xampp in E drive make sur you write path everywhere in code as of your e drive. Also make sure you are copying the exact code and smtp porta and exact syntax. If still its not working then write the error code. Good luck.

  • @RCB971
    @RCB971 4 роки тому

    i have done all the things but still mail is not going

    • @DevAnsab
      @DevAnsab  4 роки тому

      Try this ua-cam.com/video/L5uCc8Hab-I/v-deo.html

  • @wagdymohamed7362
    @wagdymohamed7362 4 роки тому

    Sendmail folder not exist in xampp directory.

    • @DevAnsab
      @DevAnsab  4 роки тому

      Please check your Xampp installation.

  • @ghgd4565
    @ghgd4565 4 роки тому

    S Tier

  • @panosalexopoulos1491
    @panosalexopoulos1491 4 роки тому

    i try to do that .. but didnt work

  • @Ghost-eo5yu
    @Ghost-eo5yu 4 роки тому

    i do not get all message eventhough follow bit by bit, there is no error

    • @DevAnsab
      @DevAnsab  4 роки тому

      May be you nee to do with google application password method. Generate your gmail application password and then use it place of original password.

  • @jayvardhanjagarwal8973
    @jayvardhanjagarwal8973 5 років тому

    Sir... Jab mail send karta h to send mail successful to likha aata h but recipient email par mail nhi aata..

    • @jayvardhanjagarwal8973
      @jayvardhanjagarwal8973 5 років тому

      Pta nhi sir kya problem h

    • @DevAnsab
      @DevAnsab  4 роки тому

      You can try changing the SMTP port to 465. If it doesn't work try 587.

  • @Exendes
    @Exendes 2 роки тому

    Can i do this in vscode? Thank you

    • @DevAnsab
      @DevAnsab  2 роки тому

      Yes, any text editor will work.

  • @sunithasaripudi3020
    @sunithasaripudi3020 5 років тому

    Mail code is successful but didn't get any mail what is the problem

    • @DevAnsab
      @DevAnsab  5 років тому

      Are you getting some error code? Have you started apache? Is your webpage is loading?
      Please check the log file and see the error code.

  • @RCB971
    @RCB971 4 роки тому

    Sir i want to talk with u...i have a problem on php sending mail please help me

    • @DevAnsab
      @DevAnsab  4 роки тому

      Please see the updated video, it will help you.

  • @chaliemulu6483
    @chaliemulu6483 5 років тому

    can this configuration work for java mail, how to send java mail from xampp

    • @DevAnsab
      @DevAnsab  5 років тому

      Sorry man can't help with that 😔
      Thanks for watching this.

  • @karmaindustrie
    @karmaindustrie 5 років тому

    what means "-t" ?

  • @mohammadkawach1715
    @mohammadkawach1715 2 роки тому

    thanks for your effort
    but it didn;t work for me