Jak przesłać email lub zmiene do php

0

Jak przesłać email w c++ korzystam z dev c++. Prosze szczegółowo jak można. W google nic nie znalazłem dobrego, kozystałem z jakiejś klasy ale wywalała błedy. Albo jak ktoś wie jak przesłać zmiene post lub get do strony bez otwierania przegladarki??

0
  1. Jaka klasa?
  2. Jakie błędy?
  3. Wywal dev c++?
0

klasa to jwsmtp
błedy to [Linker error] undefined reference to `jwsmtp::mailer(char const*, char const*, char const*, char const*, char const*, unsigned short, bool)' Wiecie może co na to poradzić bo jakoś dojść nie mogę;/

Zmienię na pewno program ale na razie nie mogę sciagąc słaby net.

0

Wskaż linkerowi lib'a(w opcjach linkera)

0

możesz jasniej bo nie rozumiem

0

Wskaź w opcjach linkera plik lib od biblioteki

0

Teraz mam inny bład
`jwsmtp' has not been declared
kod

// Note that the only valid version of the GPL as far as jwSMTP
// is concerned is v2 of the license (ie v2, not v2.2 or v3.x or whatever),
// unless explicitly otherwise stated.
//
// This file is part of the jwSMTP library.
//
//  jwSMTP library is free software; you can redistribute it and/or modify
//  it under the terms of the GNU General Public License as published by
//  the Free Software Foundation; version 2 of the License.
//
//  jwSMTP library is distributed in the hope that it will be useful,
//  but WITHOUT ANY WARRANTY; without even the implied warranty of
//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
//  GNU General Public License for more details.
//
//  You should have received a copy of the GNU General Public License
//  along with jwSMTP library; if not, write to the Free Software
//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
//
// jwSMTP library
//   http://johnwiggins.net
//   [email protected]
//
#include <iostream>
// Please note the jwsmtp library has to be installed
// for this next header to work.
#include "jwsmtp.h"

// obviously we must escape the quotes i.e. \"
std::string html("<html>"
"<body>"
"This is the html part of the message<br><br>"
"<b>bold</b><br>"
"<i>italic</i><br>"
"<font size=\"7\">Large Text</font><br><br>"
"Or a link: <a href=\"http://johnwiggins.net\">johnwiggins.net</a><br><br>"
"And an image: <br><img alt=\"an image in email\" src=\"http://johnwiggins.net/jwsmtp/example.png\"><br>"
"</body>"
"</html>");

int main(int argc, char* argv[])
{
   // replace the users 'to' and 'from' here before compiling this demo
   jwsmtp::mailer m("root", "root", "subject line",
                    "This is the plain text part of the message", "localhost",
                    jwsmtp::mailer::SMTP_PORT, false);

   // send a html file (remember you still can send an html file as an attachment
   // but calling this function will allow mime compatible clients to actually
   // display the html if the client is set to show html messages.
   //    m.setmessageHTMLfile("/home/myname/thefile.html");
   
   // Build our html from a string. You can also send html as a vector.
   // i.e.
   //    std::vector<char> htmlvec;
   //    ....add html to the vector.
   //    m.setmessageHTML(htmlvec);
   m.setmessageHTML(html);

   //m.username("[email protected]");
   //m.password("secret");
   m.send(); // send the mail
   std ::cout << m.response() << "\n";
   return 0;
}
 
0

teraz mam cannot find -lobjc

0

no dobra nie mam tej biblioteki to skad ja wziasc

0

powie ktoś jak wysłać ten email bo nie mam siły do tej klasy

0

jak ktoś zna jakąś inna biblioteke to niech poda

0

napisz se skrypt php z gotową funkcją, chyba mail? czy jakoś tak? i przez program wyślij dane do formularza, sockety

0

możesz dać jakiś link albo kod?? Php znam bardzo dobrze tylko gorzej z c++.

0

hmm, może:
http://www.cppzone.host.sk/html/artykuly/winsock.html
//albo se zassij jakiegoś buildera, czy co tam w c++ ma komponenty i wstaw na formę socket, albo idhttp i masz niemal gotowca (poszukaj se w necie jak wysyłać dane do skryptu jeśli nie wiesz)

0

Już jakoś se poradziłem, ale mam jeszcze problem jak przypisać do zmienej char drugą zmieną char.
Mam zmiena char abc[50]
potem uzytkownik wwprowadza zmieną char slowo[50]
i na końcu chce nadać zmienej abc wartosć slowo nadawanie odbywa sie w petli zawsze po pobraniu słowo sprawdzam czy slowo jest rózne od abc
Prubowałem strcpy ale zawsze wychodziło że są rózne a po wyswietleniu wygladaja indentycznie.

0

Jak sprawdzałeś? ==? Nie == tylko strcmp - zwraca 0(false)jeśli identyczne, jeśli nie 1(true).

1 użytkowników online, w tym zalogowanych: 0, gości: 1