'content-type'에 해당되는 글 2건

  1. 2013.08.13 [Spring] Controller Content-Type 설정. (ajax)
  2. 2009.07.27 [PERL] HTML 메일 발송 테스트

[Spring] Controller Content-Type 설정. (ajax)

ITWeb/개발일반 2013. 8. 13. 18:23

그냥 개발 하다 자꾸 까먹는 것들... 정리 차원에서.. ^^;

- spring controller 클래스에서 호출 method 에 설정

@RequestMapping(value = "/api", method = RequestMethod.POST, produces = "application/json; charset=utf-8")


- serve.xml 에서 URIEncoding 설정

http connector 에 설정

<Connector connectionTimeout="20000" port="8080" protocol="HTTP/1.1" redirectPort="8443" URIEncoding="UTF-8"/>

:

[PERL] HTML 메일 발송 테스트

ITWeb/개발일반 2009. 7. 27. 15:01

아래 글에 이어서.. 추가 입니다.

참고 URL :
http://alma.ch/perl/Mail-Sendmail-FAQ.html
http://search.cpan.org/~mivkovic/Mail-Sendmail-0.79/Sendmail.pm

sub setSendMail {
    my $message = $_[0];

    %mail = (
                To           => 'to@email.com',
                From         => 'from@email.com',
                Subject      => 'TITLE',
                'Content-type'  => 'text/html; charset="UTF-8"',
                Message      => "<span style='font-size:11px; font-family:맑은 고딕, 돋움'>$message</span>"
            );

    if ( $message ) {
        sendmail(%mail) or die $Mail::Sendmail::error;
        print "OK. Log says:\n", $Mail::Sendmail::log;
    }
}

보시는 바와 같이 빨간 부분을 추가해 주시면 됩니다.
Content-type 앞뒤로 quotation 빼먹으시면 정상적으로 적용 안되니 유의 하세요.

: