by Lucysmith Banned
3 replies
Hello everybody

This is lucy smith, new to this forum as well as javascript, i am trying to write code to send an email using javascript but was enable to do it and also a vertical scroll bar moving up code i need urgently, kindly help me either providing code or provide me source from source from where i can get it
#code #javaccript
  • Profile picture of the author Amsterdam
    JavaScript is a client side scripting language. Sending email from a Website requires a server side language such as PHP.

    Hope this helps,

    T
    {{ DiscussionBoard.errors[173029].message }}
    • Profile picture of the author Sean Kelly
      You do not need Javascript to do that you want.

      Simply include a mailto link in your page and when the user clicks on it their email client is automatically opened with the 'to' field automatically prefilled.

      Example:
      Code:
      <a href="mailto:you@somedomain.com">contact us</a>
      You must make sure to encode the email address so that bots and webpage scrapers do not harvest your email address for spamming. This is VERY important.

      Try this:
      Encrypt mailto-email links

      Sean
      Signature
      http://javadocs.com - Javadocs
      {{ DiscussionBoard.errors[174134].message }}
      • Profile picture of the author rirara
        You can't send email with javascript, it is a client side language. Use php instead.
        Signature
        {{ DiscussionBoard.errors[177394].message }}

Trending Topics