forms – wordpress messages not sending although it saying they were sent successfully with this php code

this is a contact form code which works and when I submit the message, it says thanks it was sent successfully, but unfortunately I have not got any messages. I use it on wordpress on local host.

what should I change in order to get the messages?? any help please

<?php
if(isset($_POST('submitted'))) {
    if(trim($_POST('contactName')) === '') {
        $nameError = 'Please enter your name.';
        $hasError = true;
    } else {
        $name = trim($_POST('contactName'));
    }


    if(trim($_POST('email')) === '')  {
        $emailError = 'Please enter your email address.';
        $hasError = true;
    } else if (!preg_match("/^((:alnum:))(a-z0-9_.-)*@(a-z0-9.-)+.(a-z){2,4}$/i", trim($_POST('email')))) {
        $emailError = 'You entered an invalid email address.';
        $hasError = true;
    } else {
        $email = trim($_POST('email'));
    }


    if(trim($_POST('subject')) === '') {
        $subjectError = 'Please enter a subject.';
        $hasError = true;
    } else {
        $subject = trim($_POST('subject'));
    }


    if(trim($_POST('comments')) === '') {
        $commentError = 'Please enter a message.';
        $hasError = true;
    } else {
        if(function_exists('stripslashes')) {
            $comments = stripslashes(trim($_POST('comments')));
        } else {
            $comments = trim($_POST('comments'));
        }
    }

    if(!isset($hasError)) {
        $emailTo = get_option('tz_email');
        if (!isset($emailTo) || ($emailTo == '') ){
            $emailTo = get_option('admin_email');
        }
        $subject = '(PHP Snippets) From '.$name;
        $body = "Name: $name nnEmail: $email nnComments: $comments";
        $headers = 'From: '.$name.' <'.$emailTo.'>' . "rn" . 'Reply-To: ' . $email;

        wp_mail($emailTo, $subject, $body, $headers);
        $emailSent = true;
    }

} ?>




        <hr class="no-margin" />

        <div class="blog-container section-content">
            <div class="container">
                <div class="row">
            <div class="col-md-8">
                <div class="box-layer custom-padding">





    <div id="container">
        <div id="content">



<div class="align-center">

                    <div class="entry-content">
                        <?php if(isset($emailSent) && $emailSent == true) { ?>
                            <div class="thanks">
                                <p>Thanks, your email was sent successfully.</p>
                            </div>
                        <?php } else { ?>
                            <?php the_content(); ?>
                            <?php if(isset($hasError) || isset($captchaError)) { ?>
                                <p class="error">Sorry, an error occured.<p>
                            <?php } ?>

                        <form action="<?php the_permalink(); ?>" id="contactForm" method="post" class="general-form">
                            <div class="contactform">
                            <p>

                                <input type="text" name="contactName" class="form-control" id="contactName" placeholder="Your Name.." value="<?php if(isset($_POST('contactName'))) echo $_POST('contactName');?>" class="required requiredField" />
                                <?php if($nameError != '') { ?>
                                    <span class="error"><?=$nameError;?></span>
                                <?php } ?>
                            </p>



                            <p>
                                <input type="text" name="email" id="email" class="form-control" placeholder="Your Email.." value="<?php if(isset($_POST('email')))  echo $_POST('email');?>" class="required requiredField email" />
                                <?php if($emailError != '') { ?>
                                    <span class="error"><?=$emailError;?></span>
                                <?php } ?>
                            </p>


                                <p>
                                <input type="text" name="subject" id="subject" class="form-control" placeholder="Your Subject.." value="<?php if(isset($_POST('subject')))  echo $_POST('subject');?>" class="required requiredField subject" />
                                <?php if($subjectError != '') { ?>
                                    <span class="error"><?=$subjectError;?></span>
                                <?php } ?>
                            </p>



                            <p>
                                <textarea name="comments" id="commentsText" class="form-control" placeholder="Your Message" rows="4" cols="100" class="required requiredField"><?php if(isset($_POST('comments'))) { if(function_exists('stripslashes')) { echo stripslashes($_POST('comments')); } else { echo $_POST('comments'); } } ?></textarea>
                                <?php if($commentError != '') { ?>
                                    <span class="error"><?=$commentError;?></span>
                                <?php } ?>
                            </p>

                            <p>
                                <input type="submit" class="btn btn-primary no-border" value="Send Message"></input>
                            </p>
                        </div>
                        <input type="hidden" name="submitted" id="submitted" value="true" />
                    </form>
                <?php } ?>
                </div>
            </div>



                    </div>
                </div></div>





                </div>





Sending a customised Google Maps itinerary – as-is – to Android phone

I’d like to have a customised route available on my phone for turn-by-turn navigation. BY customised I mean an A-to-B-to-C-to… itinerary that has been dragged at various points along the route, starting from the originally computed itinerary. Detour points added by dragging are represented by large white dots:

enter image description here

Unfortunately, as it stands now, Google Maps does not allow sending this to the phone without removing all detour points defined by dragging:

enter image description here

One workaround is to redefine each detour point not by dragging but by adding its specific location (address, or lat/long), in which case the custom itinerary can be sent to the phone as-is. This has to be within the limit of no more than 10 named detour points, but then again the same limit also applies to dragged detour points, before the message “Route cannot be modified further” comes on.

The problem is that, for long tours, while you’re on the road, if you accidentally do an extra back tap on your phone, the entire itinerary is lost, and the only way to get it back is to use the “send to phone” command on an online computer, which may not be available.

Any solutions based on Google My Maps don’t seem good, as they all lack turn-by-turn navigation. Even more advanced options such as saving the tour as a GPX are out of the question if you’re going to navigate with Google Maps Android, as it does not do GPX.

Is there any way (even hacky) to retrieve the custom itinerary directly from the phone, without the need to send it from the computer?

sales – Error sending emails “MagentoFrameworkMailMimeMessage”

Every time magento has to send an email to the customer either for sale, or for anything that has to do with operations that require sending an email to the customer.

  I have checked the log system.log and it shows me the following error

[2020-05-27 00:03:26] main.ERROR: Content must be string or resource; received "MagentoFrameworkMailMimeMessage" [] []

Before I installed Mageplaza SMTP, I have configured it and the test does send me an email correctly

SharePoint 2013 immediate alerts keeps on sending duplicate emails

We have share point 2013 environment and If we set the immediate alerts on any library or lists it keeps on sending the notification frequently with 5-10 min gap with the same change details as updated by the user.

Basically It keeps on sending duplicate notification mails until we disable the alert on the library.

Kindly guide and suggest me what could be the reason for the same.

Thanks,
Kailash

dnd 5e – Can a druid use a Sending Stone while in Wild Shape?

Per the description of the sending stones:

Sending stones come in pairs, with each smooth stone carved to match the other so the pairing is easily recognized. While you touch one stone, you can use an action to cast the sending spell from it. […]

And the description for Wild Shape states: “You can’t cast spells”. At least not until you’re high enough level.

Food for thought

The sending stones only work once per day. You can Wild Shape twice per rest. So you could Wild Shape, do your recon, revert to normal, use the stone, Wild Shape again, and then head back to the party.

dnd 5e – Can you use a sending stone while you’re wild shaped

Per the description of the Sending Stones:

Sending Stones come in pairs, with each smooth stone carved to match the other so the pairing is easily recognized. While you touch one stone, you can use an action to cast the sending spell from it.

And the description for Wild Shape states; “You can’t cast spells”. At least not until you’re high enough level.

Food for thought

The sending stones only work once per day. You can Wild Shape twice per rest. So you could Wild Shape, do your recon, revert to normal, use the stone, Wild Shape again, and then head back to the party.

iptables – Blocking everything from sending mail except postfix

How could I use iptables to block anything except the Postfix user from sending mail? It would be useful in case a web app such as wordpress got infected with malware and started sending spam.

We have just had a case where this has happened and the server was blacklisted with spamhaus. Our server hosts our website and our mail on the same IP address would be good in case there is vulnerabilities in the future.

Allow sending folders over bluetooth

When connecting to another machine over bluetooth, there is the option to “send files” in Settings>Bluetooth. The “file upload” dialog, then, does not allow sending a folder, only single files.

I have huge folders which I need to transfer to another notebook after a hd failure. It is impossible to have enough space to compress these folders in the small capacity SSD of my workplace computer, where the backup was saved. I’m detailing my situation to illustrate how crucial it is to be able to send folders, not only files, over bluetooth.

Any workaround for this?

pgp – GPG issues with sending and receiving keys

I’ve experimented a lot with GPG the last couple days and one issue persists:

Someone signed my GPG key and published it to a keyserver X. I can see on the webpage that his signature is shown under my key, so that worked. But my local PGP doesn’t understand:

gpg --keyserver (X) —refresh-keys (myKey)
gpg: refreshing 1 key from (X)
gpg: key (myKey): (...) not changed
gpg: Total number processed: 1
gpg:              unchanged: 1

If I check my signatures, that new signature doesn’t appear.

gpg --list-sigs (myKey)
=> only outputs the signatures I already had before (either manually imported or signed by other keys that belong to me)

Also, when signing a key and performing a --send-keys, it throws no errors but the key just never arrives on the servers. This only happens with some keyservers. I read something about ports maybe being closed by the firewall, but didn’t find any concise answer for what to check and how to fix.

Thanks in advance!

PS: Sometimes, the webinterfaces of the keyservers I’m using just load forever or are generally very slow or unreachable, is this normal?